/* Capacitor uses one viewport; only long forms scroll inside their card. */
html.crm-native-shell:has(.al-page),
html.crm-native-shell:has(.al-page) body,
html.crm-native-shell:has(.al-page) #appRoot{
  height:100%!important;min-height:0!important;overflow:hidden!important;
  overscroll-behavior:none;
}
html.crm-native-shell .al-page{
  position:fixed!important;inset:var(--crm-login-top,0px) 0 auto!important;
  height:var(--crm-login-height,100dvh)!important;min-height:0!important;
  padding:0!important;overflow:hidden!important;justify-content:center!important;
}
html.crm-native-shell .al-hub-wrap{
  height:100%;min-height:0;max-width:640px;padding:66px 16px 58px!important;
  justify-content:center;gap:0;
}
html.crm-native-shell .al-hub-logo{width:64px;height:64px;flex:0 0 64px;margin:0 0 6px}
html.crm-native-shell .al-hub-logo svg{width:72px;height:72px}
html.crm-native-shell .al-hub-title{font-size:25px;margin:0 0 6px}
html.crm-native-shell .al-hub-sub{font-size:13px;margin:0 0 20px}
html.crm-native-shell .al-hub-main{min-height:0;flex:0 1 auto;overflow:auto;overscroll-behavior:contain;width:100%}
html.crm-native-shell .al-hub{gap:10px;max-width:420px;grid-template-columns:1fr}
html.crm-native-shell .al-hub-card{padding:15px 18px!important;min-height:0;display:grid;grid-template-columns:52px minmax(0,1fr);column-gap:14px;text-align:left;align-items:center;border-radius:20px}
html.crm-native-shell .al-hub-card .al-hub-ico{grid-row:1 / 3;width:52px;height:52px;margin:0;border-radius:16px}
html.crm-native-shell .al-hub-card h3{font-size:17px;margin:0 0 4px}
html.crm-native-shell .al-hub-card p{font-size:12px;line-height:1.4;margin:0}
html.crm-native-shell .al-hub-footer{margin-top:16px;font-size:11px;flex:none}
html.crm-native-shell .al-install-note{display:none!important}
html.crm-native-shell .al-login-wrap{
  max-height:100%;width:100%;max-width:440px;padding:16px 16px 60px!important;
  min-height:0;box-sizing:border-box;flex-direction:column;
}
html.crm-native-shell .al-page.al-login-mode .al-login-wrap{display:flex!important;justify-content:center}
html.crm-native-shell .al-page.al-login-mode .al-card{
  flex:0 1 auto;min-height:0;max-height:none!important;overflow-y:auto!important;
  overscroll-behavior:contain;touch-action:pan-y;padding:24px!important;border-radius:24px;
}
html.crm-native-shell .al-page.al-login-mode .al-back-btn{min-height:44px;margin:0 0 6px;padding:0 6px;align-self:flex-start}
html.crm-native-shell .al-field label{font-size:13px}
html.crm-native-shell .al-input{min-height:48px;font-size:16px!important}
html.crm-native-shell .al-page #alLoginView .al-btn{min-height:48px!important;font-size:16px!important;border-radius:14px}
html.crm-native-shell .al-page.al-login-mode .al-head h2{font-size:21px!important}
html.crm-native-shell .al-pw-eye{width:44px;height:44px;right:3px;display:grid;place-items:center;padding:0}
html.crm-native-shell .al-pw-wrap .al-input{padding-right:50px}
html.crm-native-shell .al-hint-xs{font-size:11px;line-height:1.5}
.al-remember{display:flex;align-items:center;gap:10px;min-height:44px;margin:2px 0 8px;color:#475569;font-size:13px;cursor:pointer}
.al-remember input{width:20px;height:20px;min-height:20px!important;flex:none;accent-color:#2563eb}
.al-native-meta{display:none}
html.crm-native-shell .al-native-meta{display:flex;position:absolute;bottom:8px;left:16px;right:16px;z-index:2;min-height:32px;gap:4px;align-items:center;justify-content:center;flex-wrap:wrap;color:#a9bddf;font-size:11px;text-align:center}
#appRoot .al-native-meta button{color:inherit;background:none;border:0;font:inherit;text-decoration:underline;text-underline-offset:3px;min-height:44px!important;cursor:pointer;padding:4px 8px}
.al-native-meta [data-native-update-status]{width:100%}
html.crm-native-shell.crm-native-keyboard .al-native-meta,
html.crm-native-shell.crm-native-keyboard .al-hint-xs{display:none}
html.crm-native-shell.crm-native-keyboard .al-login-wrap{padding:8px 12px!important;justify-content:flex-start!important}
html.crm-native-shell.crm-native-keyboard .al-card{padding:16px!important;border-radius:18px}
html.crm-native-shell.crm-native-keyboard .al-back-btn{margin:0;min-height:36px}
html.crm-native-shell.crm-native-keyboard .al-head p{display:none}
@media(max-height:650px){
  html.crm-native-shell .al-hub-wrap{padding-top:58px!important}
  html.crm-native-shell .al-hub-logo{width:44px;height:44px;flex-basis:44px}
  html.crm-native-shell .al-hub-logo svg{width:52px;height:52px}
  html.crm-native-shell .al-hub-sub{margin-bottom:12px}
  html.crm-native-shell .al-hub-card{padding:12px!important}
}

#crmFrontendUpdate{position:fixed;left:12px;right:12px;bottom:calc(16px + env(safe-area-inset-bottom,0px));z-index:99990;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border:1px solid #a7f3d0;border-radius:16px;background:#ecfdf5;color:#064e3b;font-size:13px;box-shadow:0 8px 30px #0f172a26}
#crmFrontendUpdate button{min-height:44px;padding:8px 16px;border:0;border-radius:12px;color:#fff;background:#047857;font-weight:700;cursor:pointer}
html.crm-native-keyboard #crmFrontendUpdate{display:none}
