/* Organizaê — celular (≤760px)
   Topo curto, navegação embaixo ao alcance do polegar, botão "Nova solicitação"
   sempre à mão e menos rolagem até a lista. Espaçamento em base 8. */
@media (max-width:760px){
  /* Topo: logo à esquerda; tema, sino, foto e Sair à direita */
  html body aside{position:sticky;top:0;z-index:30;display:flex;flex-direction:row;flex-wrap:nowrap;width:100%;align-items:center;gap:8px;height:64px;padding:0 16px;border-bottom:1px solid var(--line)}
  html body aside .brand{flex:1;min-width:0;padding:0;justify-content:flex-start}
  html body aside .brand-logo,html[data-palette] body aside .brand-logo{width:96px!important;height:40px!important;max-width:100%;padding:4px 8px;border-radius:8px;object-fit:contain!important;box-sizing:border-box}
  html body aside .profile-identity{order:3;margin:0 0 0 auto;padding:0}
  html body aside .profile-identity .profile-photo{width:40px;height:40px;min-width:40px;font-size:14px}
  html body aside .profile{order:4;margin:0;padding:0;border:0}
  html body aside .profile #db-signout{width:64px;min-height:40px;margin:0;padding:0;font-size:0;white-space:nowrap}
  html body aside .profile #db-signout::after{content:"Sair";font-size:13px}
  html body aside .navlabel{display:none}

  /* Tema e sino entram no topo, ao lado da foto */
  html body header.top{position:fixed;top:12px;right:136px;z-index:31;height:40px;min-height:0;margin:0;padding:0;border:0;background:none}
  html body header.top #breadcrumb{display:none}
  html body header.top .header-actions{gap:8px!important}
  html body header.top #theme-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  html body header.top #theme-switch{height:40px;min-height:40px;padding:0}
  html body header.top .notification-bell{width:40px;height:40px;min-height:40px}

  /* Navegação embaixo (barra de navegação do Material 3) */
  html body aside nav#nav{position:fixed;left:0;right:0;bottom:0;z-index:30;display:grid!important;grid-template-columns:repeat(4,1fr);gap:0;margin:0;padding:8px 8px calc(8px + env(safe-area-inset-bottom));overflow:visible;background:var(--surface);border-top:1px solid var(--line)}
  html body aside nav#nav .nav{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:56px;margin:0;padding:0;border-radius:16px;background:none;font-size:12px;font-weight:500;white-space:nowrap}
  html body aside nav#nav .nav>span{display:grid;place-items:center;width:64px;height:32px;margin:0;border-radius:16px}
  html body aside nav#nav .nav.active,html body aside nav#nav .nav:hover{background:none!important;font-weight:700}
  html body aside nav#nav .nav.active>span{background:var(--accent-container)}
  html body aside nav#nav .nav svg{width:24px;height:24px}

  /* Espaço para a navegação e o botão flutuante não cobrirem o conteúdo */
  html body main{padding:16px 16px 168px}

  /* "Nova solicitação" vira botão flutuante, sempre ao alcance */
  html body #view .welcome>.primary,html body #view .welcome>div>.primary{position:fixed;right:16px;bottom:calc(88px + env(safe-area-inset-bottom));z-index:29;width:auto;min-height:56px;margin:0;padding:0 24px 0 16px;border-radius:16px;box-shadow:0 4px 8px rgba(0,0,0,.24),0 1px 3px rgba(0,0,0,.3)}

  /* Boas-vindas mais curtas */
  html body #view .welcome{display:block;margin:0 0 16px;padding:0}
  html body #view .welcome .eyebrow{display:none}
  html body #view .welcome h1{margin:0 0 8px;font-size:24px;line-height:32px}
  html body #view .welcome p{margin:0;font-size:14px;line-height:20px}

  /* Números do início lado a lado */
  html body #view .stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:0 0 16px}
  html body #view .stats .stat{display:flex;flex-direction:column;justify-content:flex-start;gap:4px;min-height:0;margin:0;padding:12px;text-align:left}
  html body #view .stats .stat>span:first-child{font-size:12px;line-height:16px}
  html body #view .stats .stat strong{order:-1;margin:0;font-size:24px;line-height:32px}
  html body #view .stats .stat small,html body #view .stats .stat .stat-more{display:none}

  /* Lista do início: filtros numa linha só */
  html body #view .home-followup-heading{display:block}
  html body #view .home-followup-heading h2{margin:0 0 16px;font-size:20px;line-height:28px}
  html body #view .home-followup-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}
  html body #view .home-followup-controls>button.outline{display:none}
  html body #view .home-followup-controls label{order:0;min-width:0;margin:0}
  html body #view .home-followup-controls label>span{font-size:12px}
  html body #view .home-followup-controls select{width:100%;min-width:0;min-height:48px;padding:0 32px 0 12px!important;font-size:14px;text-overflow:ellipsis;background-position:right 8px center!important}
  html body #view .home-followup-filter{order:-1!important}
  html body #view section.card{padding:16px}

  /* Solicitações: só a lista no celular; busca em cima, filtros lado a lado */
  html body #view .staff-views{display:none}
  html body #view .staff-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  html body #view .staff-controls .staff-search{grid-column:1/-1}
  html body #view .staff-controls label{min-width:0;margin:0}
  html body #view .staff-controls label>span{font-size:12px}
  html body #view .staff-controls select{width:100%;min-width:0;min-height:48px;padding:0 32px 0 12px!important;font-size:14px;text-overflow:ellipsis;background-position:right 8px center!important}
  html body #view .staff-guide{font-size:13px;line-height:20px}

}

/* Antes de entrar, nada de menu nem botão flutuante */
html body:has(#db-gate) aside nav#nav,html body:has(#db-gate) header.top{display:none!important}
