/* M2: todas las reglas visuales requieren PWA instalada en teléfono. */
@media screen {
 html.ea-mobile-app-m2{--ea-m2-panel:var(--ea-surface,#fff);--ea-m2-text:var(--ea-ink,#263548);--ea-m2-accent:var(--ea-highlight,#466ca6)}
 html.ea-mobile-app-m2 body{padding-bottom:env(safe-area-inset-bottom,0px)}
 html.ea-mobile-app-m2 .main,html.ea-mobile-app-m2 body.ea4-sidebar-hidden .main{margin-left:0!important;padding:12px 12px calc(96px + env(safe-area-inset-bottom,0px))!important;min-width:0;max-width:100%}
 html.ea-mobile-app-m2 .ea-main-v1>.topbar{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px!important;padding:12px 14px!important;border-radius:18px!important;min-height:62px;margin-bottom:14px!important;position:relative;z-index:12}
 html.ea-mobile-app-m2 .topbar h1{font-size:20px!important;line-height:1.2;font-weight:700;letter-spacing:-.3px;margin:0;min-width:0}
 html.ea-mobile-app-m2 .ea-m2-options{position:relative;justify-self:end;font-size:14px}
 html.ea-mobile-app-m2 .ea-m2-options>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:4px;min-height:40px;padding:4px 8px;border-radius:12px;background:var(--ea-soft,#edf2fa);color:var(--ea-m2-text);font-size:12px;font-weight:600}
 html.ea-mobile-app-m2 .ea-m2-options>summary::-webkit-details-marker{display:none}
 html.ea-mobile-app-m2 .ea-m2-options svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round}
 html.ea-mobile-app-m2 .ea-m2-options-panel{position:absolute;right:-4px;top:calc(100% + 12px);width:min(320px,calc(100vw - 36px));padding:16px;border:1px solid var(--ea-edge,#d7dce6);border-radius:18px;background:var(--ea-m2-panel);color:var(--ea-m2-text);box-shadow:0 16px 40px #10182735;max-height:calc(var(--ea-m2-view-height,100dvh) - 110px);overflow:auto}
 html.ea-mobile-app-m2 .ea-m2-options-panel .section-zoom{margin-bottom:14px!important}
 html.ea-mobile-app-m2 .ea-m2-options-panel .userbar{display:flex!important;flex-direction:column;align-items:stretch!important;gap:12px!important;width:100%;font-size:13px}
 html.ea-mobile-app-m2 .ea-m2-options-panel .userbar>span{padding:8px 0;border-top:1px solid var(--ea-edge,#ddd)}
 html.ea-mobile-app-m2 .ea-m2-options-panel .ea5-select-trigger,html.ea-mobile-app-m2 .ea-m2-options-panel #theme-selector{width:100%!important;max-width:100%}
 html.ea-mobile-app-m2 #ea-mobile-nav{position:fixed;bottom:0;left:0;right:0;z-index:100;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:2px;margin:0;padding:8px 5px calc(8px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--ea-edge,#d7dce6);border-radius:20px 20px 0 0;background:var(--ea-m2-panel);box-shadow:0 -8px 26px #18253812}
 html.ea-mobile-app-m2 #ea-mobile-nav button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;min-width:0;min-height:54px;padding:5px 2px!important;font-size:10px!important;line-height:1.15;border:0;border-radius:14px;background:transparent;box-shadow:none;outline:0;color:var(--ea-muted,#5d687a);overflow-wrap:anywhere}
 html.ea-mobile-app-m2 #ea-mobile-nav button span{white-space:nowrap;font-size:clamp(8px,2.3vw,10px);letter-spacing:0}
 html.ea-mobile-app-m2 #ea-mobile-nav button svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none}
 html.ea-mobile-app-m2 #ea-mobile-nav button[aria-current],html.ea-mobile-app-m2 #ea-mobile-nav button[aria-expanded=true]{background:var(--ea-soft,#e8effb);color:var(--ea-m2-accent);font-weight:700;outline:0;box-shadow:inset 0 0 0 1px var(--ea-edge,#d7dce6)}
 html.ea-mobile-app-m2 #ea-mobile-nav button:focus-visible,html.ea-mobile-app-m2 .ea-m2-options summary:focus-visible{outline:2px solid var(--ea-m2-accent);outline-offset:-2px}
 html.ea-mobile-app-m2.ea-m2-keyboard #ea-mobile-nav,html.ea-mobile-app-m2.ea-m2-dialog-open #ea-mobile-nav{display:none}
 html.ea-mobile-app-m2 .sidebar,html.ea-mobile-app-m2 body.ea4-sidebar-hidden .sidebar{display:none!important}
 html.ea-mobile-app-m2 body.ea-mobile-menu-open .sidebar{display:block!important;position:fixed!important;inset:0 0 0 auto!important;width:min(340px,100vw)!important;max-height:var(--ea-m2-view-height,100dvh);transform:none!important;z-index:180;background:var(--ea-m2-panel)!important;overflow:auto;padding:16px!important;box-shadow:-20px 0 60px #0004}
 html.ea-mobile-app-m2 #ea-mobile-close{display:block;width:100%;margin-bottom:12px}
 html.ea-mobile-app-m2 .sidebar .nav{width:100%;min-height:46px;text-align:left;border-radius:13px!important}
 html.ea-mobile-app-m2 #ea4-show-menu,html.ea-mobile-app-m2 #ea4-hide-menu{display:none!important}
 html.ea-mobile-app-m2 .card{padding:15px!important;border-radius:19px!important;min-width:0;max-width:100%;margin-bottom:14px!important;box-shadow:0 5px 18px #1a254810!important}
 html.ea-mobile-app-m2 .card h2{font-size:18px!important;line-height:1.3;margin-bottom:12px;font-weight:700}
 html.ea-mobile-app-m2 #document-form>.card>.toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:14px}
 html.ea-mobile-app-m2 #document-form>.card>.toolbar h2{flex:1;min-width:0;margin:0}
 html.ea-mobile-app-m2 #document-form>.card>.toolbar>.spacer{display:none}
 html.ea-mobile-app-m2 #document-form>.card>.toolbar>.muted{order:3;flex-basis:100%;font-size:11px!important;margin-top:0}
 html.ea-mobile-app-m2 #document-form .ea-m2-client{order:2;flex:none;width:auto!important;max-width:50%;min-height:36px!important;margin:0;padding:7px 10px!important;font-size:12px!important;border-radius:11px!important;white-space:normal;line-height:1.25}
 html.ea-mobile-app-m2 .ea-m2-empty-client,html.ea-mobile-app-m2 .ea-m2-keyboard-help{display:none!important}
 html.ea-mobile-app-m2 #draft-state{font-size:11px!important;margin:0 4px 10px;line-height:1.3}
 html.ea-mobile-app-m2 .grid,html.ea-mobile-app-m2 .grid3,html.ea-mobile-app-m2 .two-panel{grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
 html.ea-mobile-app-m2 #document-form .grid3>div{grid-column:auto!important;min-width:0}
 html.ea-mobile-app-m2 label{font-size:12px!important;line-height:1.3;margin-bottom:5px}
 html.ea-mobile-app-m2 input:not([type=checkbox]):not([type=radio]),html.ea-mobile-app-m2 textarea,html.ea-mobile-app-m2 select{font-size:16px!important;min-height:42px;padding:10px 11px!important;border-radius:12px!important;max-width:100%}
 html.ea-mobile-app-m2 button{min-height:42px;border-radius:12px!important}
 html.ea-mobile-app-m2 .toolbar,html.ea-mobile-app-m2 .foot{flex-wrap:wrap;gap:8px}
 html.ea-mobile-app-m2 .toolbar>input:not([type=checkbox]),html.ea-mobile-app-m2 .toolbar>select{width:100%;max-width:100%}
 html.ea-mobile-app-m2 .tablewrap{width:100%;max-width:100%;overflow:auto;overscroll-behavior-x:contain}
 html.ea-mobile-app-m2 .tablewrap td,html.ea-mobile-app-m2 .tablewrap th{padding:10px 8px!important;font-size:12px!important}
 html.ea-mobile-app-m2 .overlay{padding:6px!important;z-index:220}
 html.ea-mobile-app-m2 .dialog,html.ea-mobile-app-m2 .dialog.small{width:calc(100vw - 12px)!important;max-width:calc(100vw - 12px)!important;max-height:calc(var(--ea-m2-view-height,100dvh) - 12px)!important;padding:15px!important;border-radius:19px!important}
 html.ea-mobile-app-m2 .dialoghead{gap:7px;flex-wrap:wrap;margin-bottom:13px}
 html.ea-mobile-app-m2 .dialoghead h2{flex:1;min-width:0;font-size:18px!important;line-height:1.3;margin:0}
 html.ea-mobile-app-m2 .dialoghead .zoom-controls{order:3;width:100%;justify-content:center;font-size:12px}
 html.ea-mobile-app-m2 .zoom-controls button{min-height:36px;min-width:36px}
 html.ea-mobile-app-m2 .print-document10{display:block}
 html.ea-mobile-app-m2 .ea-m2-old-print,html.ea-mobile-app-m2 .print-document10 .print-options,html.ea-mobile-app-m2 .print-document10 .foot{display:none!important}
 html.ea-mobile-app-m2 #toast{z-index:450;left:12px;right:12px;bottom:calc(88px + env(safe-area-inset-bottom,0px));max-width:none;font-size:13px;padding:12px;border-radius:13px}
 html.ea-mobile-app-m2 #ea-mobile-connection{z-index:450;bottom:calc(78px + env(safe-area-inset-bottom,0px));font-size:12px}
 html.ea-mobile-app-m2.ea-m2-keyboard #toast,html.ea-mobile-app-m2.ea-m2-keyboard #ea-mobile-connection{bottom:8px}
 @media (min-width:600px){html.ea-mobile-app-m2 .grid,html.ea-mobile-app-m2 .grid3{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
 @media (prefers-reduced-motion:no-preference){
  html.ea-mobile-app-m2 button,html.ea-mobile-app-m2 .ea-m2-options summary{transition:transform 110ms ease,background-color 150ms ease,box-shadow 150ms ease}
  html.ea-mobile-app-m2 button:active,html.ea-mobile-app-m2 .ea-m2-options summary:active{transform:scale(.97)}
  html.ea-mobile-app-m2 .ea-m2-options[open] .ea-m2-options-panel{animation:ea-m2-panel 150ms ease-out}
  @keyframes ea-m2-panel{from{transform:translateY(-5px)}to{transform:translateY(0)}}
 }
}
