/* Operate mode: one-thumb scanning, readable forms, explicit secondary detail. */
.mobile-record-toggle{display:none}
@media(max-width:700px){
  .jz-admin-type{--mobile-pad:16px;-webkit-text-size-adjust:100%;font-size:14px;line-height:1.6}
  .jz-admin-type :is(main,section,article,form,.panel,.workspace,.factory-main){min-width:0}
  .jz-admin-type :is(button,a,input,select,textarea){touch-action:manipulation}
  .jz-admin-type :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea){font-size:16px!important;max-width:100%;min-height:44px;line-height:1.5}
  .jz-admin-type textarea{min-height:120px}
  .jz-admin-type :is(button,.row-button,.icon-button,.primary-button,.secondary,.ghost,.factory-button,.top-preview){min-height:44px}
  .jz-admin-type :is(p,td,.form-grid label,.drawer-panel){overflow-wrap:anywhere}
  .jz-admin-type :is(h1,h2,h3){line-height:1.4;text-wrap:balance}
  .jz-admin-type :is(button,a,input,select,textarea):focus-visible{outline:2px solid #245fef;outline-offset:3px}
  .jz-admin-type input:is([type=checkbox],[type=radio]){width:20px;height:20px;flex:none;accent-color:#245fef}
  .app-shell .main-content{padding:16px 12px calc(88px + env(safe-area-inset-bottom))}
  .app-shell .topbar{padding:12px 16px;gap:8px;min-height:68px!important}
  .app-shell .topbar h1{font-size:18px!important;line-height:1.3;white-space:nowrap!important;text-wrap:nowrap}
  .app-shell .topbar>div:not(.top-actions){min-width:0;flex:1}
  .app-shell .topbar .mobile-menu-btn{width:30px;min-width:30px;padding:0}
  .app-shell .top-actions{gap:6px;flex-shrink:0}
  .app-shell .top-actions button{padding:8px 10px;font-size:13px}
  .app-shell .top-actions #accountMenuButton{max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .app-shell .floating-check{position:static!important;width:auto!important;margin:8px 12px 0!important;box-shadow:none!important;align-self:flex-end;padding:8px 16px}
  .app-shell #payments .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}
  .app-shell #payments .metric-grid>.metric:last-child{grid-column:1/-1}
  .app-shell :is(.panel-head,.filter-content,.filter-row,.toolbar,.table-toolbar,.action-bar){flex-wrap:wrap;gap:10px}
  .app-shell .filter-panel .search-line{grid-template-columns:100px minmax(0,1fr);gap:8px}
  .app-shell .filter-panel .search-line>button{grid-column:1/-1;width:100%}
  .app-shell :is(.filter-panel,.filter-content) input{min-width:0!important}
  .app-shell .crm-tabs{gap:20px;scroll-padding-inline:16px;overscroll-behavior-x:contain}
  .app-shell .crm-tabs button{min-height:46px;font-size:14px!important}
  .app-shell .metric{padding:16px!important;min-width:0;min-height:110px}
  .app-shell .metric strong{font-size:26px!important;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
  .mobile-bottom-nav{padding-bottom:env(safe-area-inset-bottom);min-height:64px}
  .mobile-bottom-nav button{min-height:56px}
  .mobile-keyboard-open .mobile-bottom-nav{display:none!important}
  .modal{padding:0!important;align-items:stretch!important}
  .modal .modal-panel{position:relative;width:100%!important;max-width:none!important;height:100vh;height:100dvh;max-height:100dvh!important;margin:0!important;border-radius:0!important;padding:0!important;display:flex;flex-direction:column;overflow:hidden}
  .modal .modal-panel>h2{font-size:20px!important;flex:none;margin:0;padding:20px 64px 16px 20px;border-bottom:1px solid #e5eaf2}
  .modal .modal-panel>.close{position:absolute;right:12px;top:10px;width:44px;height:44px;z-index:2}
  .modal .modal-panel>.form-grid{display:flex;flex-direction:column;gap:18px;flex:1;min-height:0;overflow:auto!important;overscroll-behavior:contain;padding:20px!important;margin:0;max-height:none!important;-webkit-overflow-scrolling:touch}
  .modal .form-grid>label{display:block;width:100%;font-size:14px!important}
  .modal .form-grid :is(input:not([type=checkbox]):not([type=radio]),select,textarea){width:100%;box-sizing:border-box}
  .modal .form-grid>label>:is(input:not([type=checkbox]):not([type=radio]),select,textarea){display:block;margin-top:8px}
  .modal .form-grid .required-mark{display:inline!important;margin:0 0 0 3px!important}
  .modal .form-actions{flex:none;display:flex;gap:12px;border-top:1px solid #e5eaf2;background:#fff;margin:0;padding:12px 20px calc(12px + env(safe-area-inset-bottom))}
  .modal .form-actions>button{flex:1;min-height:46px}
  .drawer.customer-detail .drawer-panel{width:100%!important;max-width:none!important;padding:18px 16px calc(28px + env(safe-area-inset-bottom));border-radius:0!important;max-height:100dvh;overflow:auto}
  .drawer :is(.customer-detail-grid,.customer-info-grid,.detail-grid){grid-template-columns:1fr!important}
  .drawer :is(.customer-detail-actions,.drawer-actions){display:flex;flex-wrap:wrap;gap:8px}
  .drawer .drawer-close{min-width:44px;min-height:44px}
  .settings-sidebar-new{display:flex!important;overflow-x:auto;gap:8px;padding:10px!important;max-width:100%;border-bottom:1px solid #e5eaf2}
  .settings-sidebar-new :is(.settings-section-title,.settings-group-title){display:none}
  .settings-sidebar-new .settings-nav-new{flex:0 0 auto;white-space:nowrap;min-height:44px;width:auto!important;padding:10px 14px}
  .settings-layout-new{display:block!important}.settings-main-new{padding:18px 14px!important;min-width:0}
  .quote-tools>*{width:100%}.quote-tools button{min-height:44px}
  .owner-search{margin:8px 0 0!important;width:100%}.owner-search input{height:44px}.owner-search-results button{min-height:48px}
  .mobile-records{display:block!important;width:100%!important;min-width:0!important;border:0!important;table-layout:auto!important}
  .mobile-records thead{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .mobile-records tbody{display:block!important;width:100%}
  .mobile-records tbody>tr{display:block!important;position:relative;height:auto!important;border:1px solid #e2e8f0!important;border-radius:12px;background:#fff!important;margin:0 0 12px;padding:12px 14px!important;box-shadow:none!important}
  .mobile-records tbody>tr>td{height:auto!important;box-sizing:border-box}
  .mobile-records tbody>tr>td{display:grid!important;grid-template-columns:minmax(76px,30%) minmax(0,1fr);align-items:start;gap:10px;min-width:0!important;max-width:none!important;width:auto!important;padding:8px 0!important;border:0!important;white-space:normal!important;font-size:14px!important;line-height:1.6!important;text-align:left!important;overflow:visible!important}
  .mobile-records tbody>tr>td::before{content:attr(data-mobile-label);font-size:13px;line-height:1.7;color:#626c7b;font-weight:400}
  .mobile-records tbody>tr>td.mobile-identity{display:block!important;padding:2px 32px 12px 0!important;font-weight:600;font-size:16px!important;border-bottom:1px solid #edf0f4!important;margin-bottom:4px}
  .mobile-records td.mobile-identity::before,.mobile-records td.mobile-selection::before,.mobile-records td.mobile-actions::before{display:none}
  .mobile-records tbody>tr>td.mobile-selection{position:absolute;right:14px;top:14px;display:block!important;padding:0!important}
  .mobile-records tbody>tr>td.mobile-actions{display:flex!important;flex-wrap:wrap;gap:8px;padding-top:12px!important}
  .mobile-records td :is(.row-button,button,a){white-space:normal;max-width:100%;min-height:44px;line-height:1.5}
  .mobile-records td :is(.status,.badge,.pill){justify-self:start;width:auto;max-width:100%}
  .mobile-records tr:not(.row-selected):hover td{background:transparent!important}
  .mobile-records tbody>tr>td.mobile-secondary{display:none!important}
  .mobile-records tbody>tr.mobile-record-expanded>td.mobile-secondary{display:grid!important}
  .mobile-records tbody>tr>td.mobile-secondary.mobile-has-toggle{display:block!important;padding-top:4px!important}
  .mobile-records tbody>tr:not(.mobile-record-expanded)>td.mobile-secondary.mobile-has-toggle>*:not(.mobile-record-toggle){display:none!important}
  .mobile-records tbody>tr:not(.mobile-record-expanded)>td.mobile-secondary.mobile-has-toggle::before{display:none}
  .mobile-record-toggle{display:block!important;flex-basis:100%;width:100%;border:0;border-top:1px solid #edf0f4;background:#fff;color:#3f4c60;padding:10px 4px 0;margin-top:4px;text-align:center;font-size:13px;min-height:44px}
  .mobile-records td[colspan]{display:block!important;text-align:center!important}.mobile-records td[colspan]::before{display:none}
  .table-wrap:has(>.mobile-records){overflow:visible!important;min-width:0;max-width:100%;background:transparent;border:0!important}
  #platformApp .app-main{min-width:0}#platformApp header{padding:12px 16px;gap:8px;flex-wrap:wrap}
  #platformApp .header-actions{gap:8px;font-size:13px}#platformApp .header-label{display:none}
  #platformApp .workspace{padding:20px 16px!important}#platformApp :is(.headline,.panel-title){gap:14px;flex-wrap:wrap;align-items:flex-start}
  #platformApp .headline h1{font-size:26px!important;line-height:1.35}#platformApp .headline :is(p,span){font-size:14px!important;line-height:1.7}
  #platformApp .headline .eyebrow{display:none}
  #platformApp :is(.metrics,.overview-grid){grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px}
  #platformApp .metrics article{min-width:0;padding:16px}#platformApp .metrics :is(b,strong){font-size:26px;overflow-wrap:anywhere}
  #platformApp :is(.audit-filters,.ticket-filters,.toolbar){display:flex;flex-wrap:wrap;gap:10px}#platformApp :is(.audit-filters,.ticket-filters) :is(input,select){width:100%;min-width:0}
  #platformApp :is(.form-grid,.admin-form-grid){grid-template-columns:1fr!important}
  .factory-body .factory-main{padding:0 16px 32px!important}.factory-top{flex-wrap:wrap;gap:10px;padding:14px 0!important;height:auto!important;position:static!important}
  .factory-top>.top-actions{display:flex;flex-wrap:wrap;gap:8px;width:100%;justify-content:flex-start}
  .factory-top .quality-chip{width:100%;font-size:12px}.factory-top .user-avatar{display:none}.factory-top .top-preview{font-size:13px;padding:10px 12px;display:inline-flex;align-items:center}
  .factory-body .skip-link{position:absolute;top:-100px;left:16px;z-index:10000}.factory-body .skip-link:focus{top:8px;background:#fff;padding:12px}
  .factory-body .factory-side{padding:12px 16px!important;position:static!important;width:100%!important;min-height:0!important;height:auto!important;display:block!important;box-sizing:border-box}
  .factory-body .factory-side>.brand{display:flex;align-items:center;gap:10px;margin:0 0 10px!important;padding:0!important;min-height:40px;text-decoration:none;color:#202733}
  .factory-body .factory-space{margin:8px 0!important;padding:10px 12px!important;min-height:0;font-size:13px}.factory-body .factory-space small{font-size:12px}
  .factory-body .factory-nav{display:flex!important;flex-direction:row!important;align-items:center;flex-wrap:nowrap!important;overflow:auto;gap:8px;padding:4px 0 8px!important;width:100%;max-width:100%;box-sizing:border-box}.factory-body .factory-nav a{flex:0 0 auto!important;min-height:44px;padding:10px 14px;font-size:14px;white-space:nowrap}.factory-body .factory-nav .nav-group-label{display:none}
  .factory-body .factory-hero{padding:22px 0!important;min-height:0!important;display:block}.factory-hero h1{font-size:27px!important;line-height:1.4;letter-spacing:-.5px}.factory-hero p{font-size:14px!important;line-height:1.8}.factory-hero .hero-orbit,.factory-hero .eyebrow{display:none}
  .factory-body .progress-rail{overflow-x:auto;justify-content:flex-start;padding:14px 0;gap:12px}.progress-rail .progress-step{flex:none;min-width:98px}.progress-rail .progress-step small{font-size:12px}.progress-rail .progress-line{flex:none;width:18px}
  .factory-body :is(.section-heading,.content-heading,.asset-toolbar){flex-wrap:wrap;gap:12px}.factory-body :is(.section-heading,.content-heading) h2{font-size:22px!important}
  .factory-body :is(.template-grid,.draft-grid,.dialog-grid,.product-form-grid){grid-template-columns:1fr!important}.factory-body .asset-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .factory-body .template-card:not(:first-child):not([hidden]){display:block!important}.factory-body .template-card[hidden]{display:none!important}.factory-body .dropzone{min-height:150px}
  .factory-body :is(.asset-info,.draft-card-body){min-width:0}.factory-body .asset-info h3{font-size:14px!important}.factory-body .asset-info small{font-size:12px!important}.factory-body .asset-actions{flex-wrap:wrap;gap:6px}
  .factory-body .builder-outline{position:static!important;max-height:200px;overflow:auto}.factory-body .builder-layout .draft-card{grid-template-columns:1fr}.factory-body .draft-card-image{height:170px;min-height:0}.factory-body .draft-card-image img{height:100%;object-fit:cover}
  .factory-body .factory-dialog{max-width:100%!important;width:100%!important;max-height:100dvh!important;border-radius:12px 12px 0 0;padding:0}.factory-dialog form{padding:20px!important;max-height:100dvh;overflow:auto}.factory-dialog-actions{position:sticky;bottom:0;background:#fff;display:flex;flex-wrap:wrap;padding:12px 0 calc(12px + env(safe-area-inset-bottom));z-index:2}.factory-dialog-actions button{flex:1}
  .factory-dialog .eyebrow{display:none}
  .factory-body :is(.factory-dialog label,.field-label){font-size:14px}.factory-body .image-choice span{font-size:12px}.factory-body .image-picker{max-height:220px}
  #platformApp #tenantForm>.form-actions{position:sticky;bottom:0;background:#fff;padding:12px 0 calc(12px + env(safe-area-inset-bottom));border-top:1px solid #e5eaf2;z-index:2;display:flex;gap:10px;flex-wrap:wrap}#tenantForm>.form-actions>span{width:100%;font-size:12px}#tenantForm #saveTenant{width:100%}
  .jz-admin-type .mobile-records [hidden]{display:none!important}
}
