/* P46 — mobile foundation; no changes to desktop layout. */
.af46-mobile-header,.af46-mobile-nav,.af46-menu:not([open]){display:none}
@media (max-width:767px){
  html body.drive-store-shell.af46-mobile-ready .ds-persistent-shell{display:flex!important;flex-direction:column!important;height:100vh!important;height:100dvh!important;min-height:0!important;overflow:hidden!important}
  html body.drive-store-shell.af46-mobile-ready .ds-icon-rail{display:none!important}
  html body.drive-store-shell.af46-mobile-ready .ds-persistent-main#drive-scroll-area{flex:1 1 0!important;width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;margin:0!important;overflow:auto!important;scrollbar-gutter:auto!important;overscroll-behavior-y:contain}
  html body.drive-store-shell.af46-mobile-ready #drive-frame.ds-content{width:100%!important;max-width:100%!important;min-width:0!important;padding:16px max(12px,env(safe-area-inset-right)) 26px max(12px,env(safe-area-inset-left))!important;margin:0!important}
  .af46-mobile-ready .af46-mobile-header{display:flex;flex:0 0 auto;align-items:center;gap:10px;min-height:56px;padding:8px max(76px,calc(65px + env(safe-area-inset-right))) 8px max(13px,env(safe-area-inset-left));padding-top:calc(8px + env(safe-area-inset-top));background:#292929;color:#fff;box-sizing:border-box}
  .af46-mobile-header img{width:33px;height:33px;object-fit:contain;flex:none}
  .af46-mobile-header div{flex:1;min-width:0;display:grid;line-height:1.35}
  .af46-mobile-header strong{font-size:15px;color:white;white-space:nowrap}
  .af46-mobile-header small{font-size:11px;color:#c3c3c3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .af46-mobile-user{display:grid;place-items:center;flex:0 0 30px;height:30px;border-radius:50%;background:#464646;color:white;font-weight:700}
  .af46-mobile-ready .af46-mobile-nav{display:flex;flex:0 0 auto;justify-content:space-evenly;align-items:stretch;background:#fff;border-top:1px solid #e0e5ea;padding:4px max(4px,env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left));box-shadow:0 -3px 14px #17202b09}
  .af46-mobile-nav :is(a,button),.af46-menu-grid a{appearance:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:transparent;color:#596676;border:0;text-decoration:none;font:600 11px/1.2 system-ui,sans-serif;box-sizing:border-box;min-height:52px;min-width:0;padding:6px 2px;margin:0;border-radius:6px;box-shadow:none;text-align:center;overflow-wrap:anywhere;cursor:pointer}
  .af46-mobile-nav :is(a,button){flex:1 1 0;max-width:110px}
  .af46-mobile-nav svg,.af46-menu-grid svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
  .af46-mobile-nav .active,.af46-menu-grid .active{color:#c9001a;background:#fff0f2}
  .af46-mobile-nav :is(a,button):focus-visible,.af46-menu :is(a,button):focus-visible{outline:2px solid #315d86;outline-offset:-2px}
  .af46-menu[open]{position:fixed;inset:auto 0 0;display:block;width:100%;max-width:100%;max-height:85vh;max-height:85dvh;margin:0;padding:16px max(12px,env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));border:0;border-radius:16px 16px 0 0;background:#fff;color:#182c43;overflow:auto;overscroll-behavior:contain;box-sizing:border-box}
  .af46-menu::backdrop{background:#131b27a6}
  .af46-menu header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
  .af46-menu header h2{font-size:18px;margin:0;color:#182c43}
  .af46-menu .af46-close,.af46-menu .af46-logout button{min-height:44px;padding:8px 14px;border:1px solid #e0e5ea;border-radius:6px;background:white;color:#bd0018;font:600 13px system-ui,sans-serif}
  .af46-menu-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .af46-menu-grid a{min-height:78px;border:1px solid #e4e8ed;padding:8px 4px;gap:7px;font-size:12px;color:#26384c}
  .af46-menu-grid svg{color:#d0001a}
  .af46-menu .af46-logout{margin:14px 0 0}.af46-menu .af46-logout button{width:100%}
  body.drive-store-shell.af46-mobile-ready .ds-real-tooltip{display:none!important}
  body.drive-store-shell.af46-mobile-ready .af-tools-dock{--af-tools-edge-gap:12px;top:calc(8px + env(safe-area-inset-top));right:calc(12px + env(safe-area-inset-right))}
  body.drive-store-shell.af46-mobile-ready .af-tools-toggle{height:36px;min-height:36px;flex-basis:36px;border-radius:6px}
  body.drive-store-shell.af46-mobile-ready .af-tools-item{min-height:44px}
  body.drive-store-shell.af46-mobile-ready .af-update-pwa{bottom:calc(68px + env(safe-area-inset-bottom))}
  body.drive-store-shell #drive-frame :is(.dv-operation-grid,.dv-analytics-grid,.dv-bottom-grid,.dv-shortcuts-grid,.dv-revenue-grid){grid-template-columns:minmax(0,1fr)!important}
  body.drive-store-shell #drive-frame .dv-dashboard .dv-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px}
  body.drive-store-shell #drive-frame .dv-dashboard :is(.dv-panel,.dv-metric){min-width:0;max-width:100%;padding:12px;overflow-wrap:anywhere}
  body.drive-store-shell #drive-frame .dv-dashboard .dv-metric strong{font-size:clamp(16px,5vw,24px);overflow-wrap:anywhere}
  body.drive-store-shell #drive-frame .dv-dashboard .dv-metric .dv-metric-money{font-size:clamp(15px,4vw,19px)}
  body.drive-store-shell #drive-frame .dv-dashboard .dv-section-heading{flex-wrap:wrap;gap:8px}
  body.drive-store-shell #drive-frame .dv-dashboard .dv-fipe-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.drive-store-shell #drive-frame .dv-dashboard .dv-fipe-kpis strong{font-size:15px}
  body.drive-store-shell #drive-frame .dv-dashboard #dv-fipe-card #dv-fipe-order{height:40px!important;min-height:40px!important;max-height:40px!important;font-size:13px!important}
  body.drive-store-shell #drive-frame .dv-dashboard .dv-fipe-pagination button.dv-fipe-dot{height:44px;min-width:28px;flex-basis:28px}
  body.drive-store-shell #drive-frame .dv-dashboard .dv-quick-form{grid-template-columns:minmax(0,1fr)}
  body.drive-store-shell #drive-frame .dv-dashboard .dv-create-popover{max-width:100%;width:100%}
  body.drive-store-shell #drive-frame .dv-dashboard .dv-revenue-scroll{max-width:100%}
  body.drive-auth-shell .login-shell{display:flex!important;flex-direction:column!important;min-height:100vh;min-height:100dvh;padding:0!important;width:100%!important;max-width:none!important;gap:0!important}
  body.drive-auth-shell .auth-brand{width:100%!important;min-height:0!important;padding:calc(18px + env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) 18px max(18px,env(safe-area-inset-left))!important}
  body.drive-auth-shell .auth-brand h1{font-size:clamp(25px,7vw,34px)!important;line-height:1.15;margin:14px 0 8px!important}
  body.drive-auth-shell .auth-brand p{font-size:13px!important;line-height:1.45}
  body.drive-auth-shell .auth-panel{width:100%!important;min-height:0!important;flex:1;padding:24px max(18px,env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))!important}
  body.drive-auth-shell .auth-card{width:100%!important;max-width:440px!important;margin:auto!important;min-width:0!important;padding:0!important}
  body.drive-auth-shell .auth-card :is(input,button[type=submit]){width:100%;min-height:48px;font-size:16px!important}
}
@media(max-width:359px){.af46-menu-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.af46-mobile-nav :is(a,button){font-size:10px}}
