/* Role-first mobile shortcuts. Works with the official white/turquoise shell. */
@media(max-width:820px){
 #app .mobile-bottom-nav.av-role-mobile-nav{
  position:fixed!important;inset:auto 0 0!important;height:calc(68px + env(safe-area-inset-bottom))!important;
  display:flex!important;align-items:stretch!important;justify-content:space-around!important;
  padding:5px max(6px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))!important;
  border-top:1px solid #d5efea!important;background:rgba(255,255,255,.985)!important;
  box-shadow:0 -10px 30px rgba(8,81,76,.07)!important;backdrop-filter:blur(14px)!important;
  z-index:85!important;gap:2px!important;
 }
 #app .av-role-mobile-nav .av-role-nav-button{
  flex:1 1 0;min-width:0;max-width:112px;height:58px;
  border:0!important;border-radius:12px;background:transparent!important;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:4px;color:#55787a!important;font-size:12px!important;font-weight:750!important;
  padding:5px 0!important;margin:0!important;box-shadow:none!important;
 }
 #app .av-role-mobile-nav .av-role-nav-button>span{display:grid;place-items:center;width:23px;height:23px;color:inherit}
 #app .av-role-mobile-nav .av-role-nav-button svg{width:23px!important;height:23px!important}
 #app .av-role-mobile-nav .av-role-nav-button small{
  display:block!important;color:inherit;font-size:10px;line-height:1.1;
  font-weight:750;white-space:nowrap;letter-spacing:.005em
 }
 #app .av-role-mobile-nav .av-role-nav-button.active{
  color:#008f88!important;background:#e7faf6!important;
 }
 #app .av-role-mobile-nav .av-role-nav-button:focus-visible{outline:3px solid #00b8b2;outline-offset:0}
 #app .av-role-mobile-nav .av-role-nav-button.av-role-primary{
  color:#008e8c!important;
 }
 #app .av-role-mobile-nav .av-role-nav-button.av-role-primary>span{
  width:49px;height:49px;border-radius:50%;background:linear-gradient(145deg,#00c9bc,#028d90);
  border:3px solid white;box-shadow:0 6px 15px rgba(0,167,159,.21);
  transform:translateY(-9px);color:#fff!important;
 }
 #app .av-role-mobile-nav .av-role-nav-button.av-role-primary svg{width:24px!important;height:24px!important}
 #app .av-role-mobile-nav .av-role-nav-button.av-role-primary small{
  margin-top:-11px;color:#078a89!important;
 }
 #app .view{padding-bottom:calc(100px + env(safe-area-inset-bottom))!important}
 .offline-dock{bottom:calc(80px + env(safe-area-inset-bottom))!important}
 body.av-camera-open #app .av-role-mobile-nav{display:none!important}
 body.av2-menu-open #app .av-role-mobile-nav{pointer-events:none}
}
@media(min-width:821px){#app .av-role-mobile-nav{display:none!important}}

/* Field status is a real, accessible device-status dialog, not an assessment scroll shortcut. */
.av-field-status-dialog{
 box-sizing:border-box;width:min(92vw,460px);max-width:calc(100vw - 24px);
 max-height:calc(100dvh - 36px);overflow-y:auto;
 margin:auto;padding:24px;border:1px solid #d5eae7;border-radius:22px;
 color:#163d42;background:#fff;box-shadow:0 22px 80px rgba(4,55,59,.26);
}
.av-field-status-dialog::backdrop{background:rgba(6,31,37,.52);backdrop-filter:blur(3px)}
.av-field-status-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.av-field-status-kicker{font-size:11px;font-weight:800;letter-spacing:.13em;color:#078b88}
.av-field-status-header h2{margin:6px 0 8px;font-size:clamp(23px,5vw,29px);line-height:1.15;color:#123e44}
.av-field-status-header p{margin:0;color:#627d80;font-size:14px;line-height:1.5}
.av-field-status-close{flex:0 0 42px;height:42px;border:1px solid #e0ebea;border-radius:14px;background:#f2faf8;color:#29545a;font-size:28px;line-height:1;cursor:pointer}
.av-field-status-connection{display:flex;align-items:center;gap:10px;margin:23px 0 16px;padding:13px 16px;border-radius:13px;background:#e5f8f5;color:#086b67;font-size:14px}
.av-field-status-dot{height:10px;width:10px;flex:0 0 10px;border-radius:50%;background:#08aaa0}
.av-field-status-offline .av-field-status-connection{background:#fff2e4;color:#8c4d17}
.av-field-status-offline .av-field-status-dot{background:#d98b25}
.av-field-status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.av-field-status-stat{min-width:0;border:1px solid #dfedeb;border-radius:15px;background:#f7fbfa;padding:16px 13px;display:flex;flex-direction:column;gap:5px}
.av-field-status-stat strong{font-size:28px;line-height:1.1;color:#086f72;font-variant-numeric:tabular-nums}
.av-field-status-stat span{font-size:12px;line-height:1.4;color:#577377;font-weight:650}
.av-field-status-note{min-height:45px;margin:17px 0;color:#536e72;font-size:13px;line-height:1.55}
.av-field-status-actions{display:flex;gap:9px;flex-wrap:wrap}
.av-field-status-actions button{min-height:44px;flex:1 1 155px}
@media(max-width:420px){
 .av-field-status-dialog{padding:19px;max-height:calc(100dvh - 22px)}
 .av-field-status-stat{padding:13px 10px}
}


/* 2026-11-22 · All-tab viewport invariant.
 * Wide Audit/Inventory/GIS tables can make their CONTENT scroll but must never
 * enlarge the five-slot mobile navigation's containing width.
 * The bar is fixed to the visual viewport, not the active tab's scroll width. */
@media (max-width:820px){
 html,body{max-width:100%;overflow-x:clip}
 #app,#app>.workspace,#app .view{
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
 }
 #app .mobile-bottom-nav.av-role-mobile-nav{
  position:fixed!important;
  left:0!important;right:auto!important;bottom:0!important;
  width:100vw!important;max-width:100vw!important;
  width:100dvw!important;max-width:100dvw!important;
  min-width:0!important;box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  justify-content:stretch!important;align-items:stretch!important;
  overflow:hidden!important;
  transform:none!important;
 }
 #app .mobile-bottom-nav.av-role-mobile-nav>.av-role-nav-button{
  display:flex!important;flex-direction:column!important;
  width:100%!important;min-width:0!important;max-width:none!important;
  box-sizing:border-box!important;
  padding-inline:2px!important;
  overflow:hidden!important;
  overflow-wrap:normal!important;word-break:normal!important;
 }
 #app .mobile-bottom-nav.av-role-mobile-nav>.av-role-nav-button small{
  min-width:0;max-width:100%;font-size:clamp(9px,2.5vw,11px)!important;
  text-overflow:ellipsis;overflow:hidden;
  white-space:nowrap!important;
 }
 #app .view :where(.av2-table-scroll,.table-wrap,.raa-scroll,.ra3-scroll){
  min-width:0;max-width:100%;
  overscroll-behavior-inline:contain;
 }
}
@media (max-width:360px){
 #app .mobile-bottom-nav.av-role-mobile-nav{
  padding-inline:max(3px,env(safe-area-inset-left)) max(3px,env(safe-area-inset-right))!important;
  column-gap:0!important;
 }
 #app .mobile-bottom-nav.av-role-mobile-nav>.av-role-nav-button svg{
  width:21px!important;height:21px!important;
 }
}
