/* ==========================================================================
   shell.css  |  RCEM Hub, base comum

   O que e: todo o estilo da barra superior comum (HubShell), dos menus (modulos e usuario), da faixa de
   modo aberto, dos dialogos de acesso, da tela de entrada e da paleta de comandos (HubPalette).
   Define: .hub-shell-host .hub-shell (e filhos .hub-shell-*), .hub-pal (e filhos .hub-pal-*), .hub-shell-k (tecla).
   Consome: variaveis de tokens.css. Os tokens novos (--hx-*, --elev-*, --radius-*) entram com valor de reserva, entao
     a barra e a paleta ficam corretas mesmo antes de tokens.css recebe-los.
   Menus (.hub-shell-pop): altura limitada pela janela (100dvh menos a barra) e, quando ha mais itens do que cabem, degrade de pista
     no topo e no pe (atributo data-r gravado por shell.js). O seletor de modulos fica dentro de <nav aria-label="Modulos do Hub">.
   Regras: so variaveis de tokens.css (nenhuma cor solta); barra na cor da pagina com vidro fosco (um unico elemento,
     o proprio .hub-shell, com position relative e z-index que vencem regras de modulo; no celular os menus sao
     absolutos, nao fixos); 390 px sem rolagem horizontal; foco
     visivel de 3 px; alvo de toque de 44 px; prefers-reduced-motion desliga animacao e transicao.
   Carregar depois de components.css. Se faltar, shell.js injeta o link sozinho (sonda --hub-shell-css).
   ========================================================================== */

:root{--hub-shell-css:1}
@keyframes hub-shell-pop{from{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:none}}
@keyframes hub-shell-sobe{from{opacity:0;transform:translateY(14px) scale(.985)}to{opacity:1;transform:none}}

/* ----- barra ----- */
.hub-shell-host{--hub-shell-pad:clamp(16px,2.8vw,40px);position:sticky;top:0;z-index:var(--z-top,30)}
.hub-shell-host.mod{--hub-shell-pad:clamp(14px,1.6vw,24px)}
.hub-shell{position:relative!important;z-index:var(--z-drawer,70);font-family:var(--font);color:var(--text);border-bottom:1px solid var(--line);background:var(--paper)}
.hub-shell-in{position:relative;display:flex;align-items:center;gap:12px;min-height:var(--top-h,68px);max-width:calc(var(--hx-wrap,1440px) + 2 * var(--hub-shell-pad));margin:0 auto;padding:0 var(--hub-shell-pad)}
.hub-shell-host.mod .hub-shell-in{max-width:none}
.hub-shell-logo{display:flex;align-items:center;gap:12px;flex:none;color:var(--primary);border-radius:10px}
.hub-shell-logo svg{height:27px;width:auto;display:block}
.hub-shell-selo{font-size:11px;font-weight:800;letter-spacing:.18em;text-transform:uppercase;padding:5px 9px;border:1px solid var(--line-strong);border-radius:var(--radius-pill,999px);color:var(--text-2);line-height:1}
.hub-shell-nav{display:flex;align-items:center;gap:12px;flex:none}
.hub-shell-ancora{position:relative;flex:none}
.hub-shell-fill{flex:1 1 0;min-width:0}
.hub-shell-acoes{display:flex;align-items:center;gap:8px;flex:none}
.hub-shell-logo:focus-visible,.hub-shell-pill:focus-visible,.hub-shell-ib:focus-visible,.hub-shell-pbusca:focus-visible,.hub-shell-mod:focus-visible,.hub-shell-mi:focus-visible,.hub-shell-faixa button:focus-visible{outline:3px solid var(--focus);outline-offset:2px}

.hub-shell-pill,.hub-shell-user{display:inline-flex;align-items:center;gap:8px;height:44px;padding:0 14px;border-radius:var(--radius-pill,999px);border:1px solid var(--line-strong);background:transparent;color:var(--text);font-weight:700;font-size:13px;white-space:nowrap;transition:border-color var(--dur),background-color var(--dur)}
.hub-shell-user{padding:0 12px 0 7px}
.hub-shell-pill:hover,.hub-shell-user:hover,.hub-shell-pill[aria-expanded="true"],.hub-shell-user[aria-expanded="true"]{border-color:var(--text);background:var(--surface)}
.hub-shell-pill svg.i{width:18px;height:18px}
.hub-shell-chev{width:14px!important;height:14px!important;opacity:.6;transition:transform .3s var(--ease-out,var(--ease))}
[aria-expanded="true"]>.hub-shell-chev{transform:rotate(180deg)}
.hub-shell-nome{max-width:150px;overflow:hidden;text-overflow:ellipsis}
.hub-shell-avatar{width:30px;height:30px;border-radius:50%;background:var(--primary);color:var(--on-primary);display:inline-grid;place-items:center;flex:none;font-size:11px;font-weight:800;letter-spacing:.02em}

.hub-shell-pbusca{flex:1 1 240px;max-width:440px;min-width:0;height:44px;display:flex;align-items:center;gap:10px;padding:0 10px 0 16px;border-radius:var(--radius-pill,999px);border:1px solid var(--line-strong);background:var(--surface);color:var(--muted);text-align:left;font-weight:500;font-size:13.5px;transition:border-color var(--dur)}
.hub-shell-pbusca:hover{border-color:var(--text)}
.hub-shell-pbusca svg.i{width:18px;height:18px}
.hub-shell-pbusca-t{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hub-shell-k{display:inline-block;font:700 11px/1 var(--font);letter-spacing:0;padding:5px 7px;border-radius:7px;border:1px solid var(--line-strong);background:var(--surface-2);color:var(--text-2);white-space:nowrap;vertical-align:middle}

.hub-shell-ib{position:relative;width:44px;height:44px;border-radius:50%;border:1px solid var(--line-strong);display:inline-grid;place-items:center;color:var(--text);background:transparent;transition:border-color var(--dur),background-color var(--dur)}
.hub-shell-ib:hover{border-color:var(--text);background:var(--surface)}
.hub-shell-ib svg.i{width:20px;height:20px}
.hub-shell-sino{display:inline-block}
.hub-shell-badge{position:absolute;top:-4px;right:-4px;min-width:20px;height:20px;padding:0 5px;border-radius:99px;background:var(--neg);color:var(--surface);border:2px solid var(--paper);font-size:10.5px;font-weight:800;line-height:16px;text-align:center;pointer-events:none}
.hub-shell-badge[hidden]{display:none}

/* sol que vira lua */
.hub-shell-tema svg{width:22px;height:22px;overflow:visible}
.hub-shell-tema .rays{transform-origin:12px 12px;transition:transform .55s var(--ease-out,var(--ease)),opacity .3s}
.hub-shell-tema .core,.hub-shell-tema .bite{transform-box:fill-box;transform-origin:center;transition:transform .55s var(--ease-out,var(--ease))}
.hub-shell-tema .core{transform:scale(.62)}
.hub-shell-tema .bite{transform:scale(0)}
.hub-shell-tema.escuro .rays{transform:rotate(90deg) scale(.4);opacity:0}
.hub-shell-tema.escuro .core{transform:scale(1) rotate(-20deg)}
.hub-shell-tema.escuro .bite{transform:scale(1)}
html.tt .hub-shell,html.tt .hub-shell *,html.tt .hub-pal-box,html.tt .hub-pal-box *{transition:background-color .45s ease,color .45s ease,border-color .45s ease,fill .45s ease,stroke .45s ease,box-shadow .45s ease}

/* ----- menus (disclosure) ----- */
.hub-shell-pop{position:absolute;top:calc(100% + 10px);left:0;z-index:var(--z-drawer,70);width:min(400px,calc(100vw - 24px));max-height:min(calc(100vh - var(--top-h,68px) - 16px),900px);max-height:min(calc(100dvh - var(--top-h,68px) - 16px),900px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--line-strong) transparent;padding:8px;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:var(--radius-card,24px);box-shadow:var(--elev-2,var(--shadow-lg));animation:hub-shell-pop .22s var(--ease-out,var(--ease)) both}
/* pista de rolagem: degrade que cobre o que continua acima ou abaixo (shell.js grava data-r="c b" conforme a posição) */
.hub-shell-pop::before,.hub-shell-pop::after{content:"";position:sticky;display:block;height:34px;pointer-events:none;opacity:0;transition:opacity .2s}
.hub-shell-pop::before{top:0;margin:-8px -8px -26px;background:linear-gradient(var(--surface) 25%,transparent)}
.hub-shell-pop::after{bottom:0;margin:-26px -8px -8px;background:linear-gradient(transparent,var(--surface) 75%)}
.hub-shell-pop[data-r~="c"]::before,.hub-shell-pop[data-r~="b"]::after{opacity:1}
.hub-shell-pop.dir{left:auto;right:0;width:min(330px,calc(100vw - 24px))}
.hub-shell-pop[hidden]{display:none}
.hub-shell-ph{padding:10px 12px 10px;margin-bottom:6px;border-bottom:1px solid var(--line-soft)}
.hub-shell-ph b{display:block;font-size:15px;letter-spacing:-.02em}
.hub-shell-ph span{font-size:12.5px;color:var(--muted)}
.hub-shell-mod,.hub-shell-mi{display:flex;align-items:center;gap:12px;width:100%;padding:10px 12px;border-radius:18px;color:var(--text);text-align:left;font-weight:600;font-size:13.5px;transition:background-color var(--dur)}
a.hub-shell-mod:hover,.hub-shell-mi:hover,.hub-shell-mod.sel{background:var(--surface-2)}
.hub-shell-mod[aria-current="page"]{background:var(--primary-soft)}
.hub-shell-mod[aria-disabled="true"]{opacity:.62;cursor:not-allowed}
.hub-shell-mod-ic,.hub-shell-mi-ic{--mc:var(--primary);width:40px;height:40px;border-radius:13px;display:grid;place-items:center;flex:none;color:var(--mc);background:color-mix(in srgb,var(--mc) 14%,var(--surface))}
.hub-shell-mi-ic{width:36px;height:36px;border-radius:12px;--mc:var(--text-2);background:var(--surface-2)}
.hub-shell-mod-tx,.hub-shell-mi-tx{min-width:0;flex:1;overflow-wrap:anywhere}
.hub-shell-mod-tx b,.hub-shell-mi-tx b{display:block;font-size:14px;font-weight:700;letter-spacing:-.015em}
.hub-shell-mod-tx small,.hub-shell-mi-tx small{display:block;font-size:12px;font-weight:500;color:var(--muted);line-height:1.35}
.hub-shell-chips{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;margin-top:6px}
.hub-shell-estado,.hub-shell-chip{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:700;padding:2px 8px;border-radius:99px;background:var(--surface-2);color:var(--text-2);border:1px solid var(--line);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hub-shell-estado i{width:7px;height:7px;border-radius:50%;background:var(--muted);flex:none}
.hub-shell-estado.pos i{background:var(--pos-fill)}
.hub-shell-estado.warn i{background:var(--warn-fill)}
.hub-shell-estado.warn{color:var(--warn);background:var(--warn-bg);border-color:transparent}
.hub-shell-chip.neg{color:var(--neg);background:var(--neg-bg);border-color:transparent}
.hub-shell-chip.warn{color:var(--warn);background:var(--warn-bg);border-color:transparent}
.hub-shell-chip.pos{color:var(--pos);background:var(--pos-bg);border-color:transparent}
.hub-shell-uh{display:flex;align-items:center;gap:12px;padding:10px 12px 12px;margin-bottom:6px;border-bottom:1px solid var(--line-soft)}
.hub-shell-uh .hub-shell-avatar{width:42px;height:42px;font-size:14px}
.hub-shell-uh b{display:block;font-size:15px;letter-spacing:-.02em}
.hub-shell-uh div>span:not(.hub-shell-modo){display:block;font-size:12.5px;color:var(--muted);overflow-wrap:anywhere}
.hub-shell-modo{display:inline-flex;align-items:center;gap:6px;margin-top:6px;padding:2px 8px;border-radius:99px;background:var(--warn-bg);color:var(--warn);font-size:11.5px;font-weight:700}
.hub-shell-sepm{height:1px;background:var(--line-soft);margin:6px 8px}
.hub-shell-mi[data-ac="sair"] .hub-shell-mi-ic{color:var(--neg);background:var(--neg-bg)}

.hub-shell-nota{font-size:12px;color:var(--muted);line-height:1.45}

/* ----- faixa do modo aberto ----- */
.hub-shell-faixa{background:var(--warn-bg);color:var(--warn);border-bottom:1px solid var(--line);font-size:13px;font-weight:600}
.hub-shell-faixa-in{display:flex;align-items:center;gap:8px 12px;max-width:calc(var(--hx-wrap,1440px) + 2 * var(--hub-shell-pad));margin:0 auto;padding:7px var(--hub-shell-pad);min-height:44px}
.hub-shell-host.mod .hub-shell-faixa-in{max-width:none}
.hub-shell-faixa.rec .hub-shell-faixa-in{min-height:28px;padding-top:3px;padding-bottom:3px}
.hub-shell-faixa-ic{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:color-mix(in srgb,var(--warn) 16%,transparent);flex:none}
.hub-shell-faixa-t{flex:1;min-width:0;line-height:1.35}
.hub-shell-faixa-b{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:0 12px;border-radius:99px;border:1.5px solid currentColor;font-weight:800;font-size:12.5px;color:inherit;white-space:nowrap}
.hub-shell-faixa-b:hover{background:color-mix(in srgb,var(--warn) 14%,transparent)}
.hub-shell-faixa.rec .hub-shell-faixa-b{border-color:transparent;min-height:22px;padding:0 8px;font-size:12px}
.hub-shell-faixa-x{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;color:inherit;flex:none}
.hub-shell-faixa-x:hover{background:color-mix(in srgb,var(--warn) 14%,transparent)}

/* ----- formularios de acesso e tela de entrada ----- */
.hub-shell-form{display:flex;flex-direction:column;gap:12px}
.hub-shell-campo{display:flex;flex-direction:column;gap:5px;font-size:12.5px;font-weight:700;color:var(--text-2)}
.hub-shell-senha{display:flex;gap:6px}
.hub-shell-senha .hub-input{flex:1;min-width:0}
.hub-shell-senha button{flex:none;padding:0 12px;border-radius:var(--radius-xs);border:1px solid var(--line-strong);font-size:12.5px;font-weight:700;color:var(--text-2)}
.hub-shell-erro{color:var(--neg);background:var(--neg-bg);border-radius:var(--radius-xs);padding:8px 12px;font-size:13px;font-weight:600}
.hub-shell-erro[hidden]{display:none}
.hub-shell-forca{font-size:12px;color:var(--muted)}
.hub-shell-gate{position:fixed;inset:0;z-index:var(--z-dialog,90);display:flex;align-items:center;justify-content:center;padding:16px;overflow:auto;isolation:isolate;background:var(--hx-hero,var(--teal-deep));color:var(--hx-on-1,var(--lime))}
.hub-shell-gate::before{content:"";position:absolute;z-index:-1;width:720px;height:720px;max-width:140vw;right:-160px;top:-340px;border-radius:50%;background:radial-gradient(circle,color-mix(in srgb,var(--lime) 50%,transparent),transparent 62%)}
.hub-shell-gate::after{content:"";position:absolute;z-index:-1;inset:0;background-image:radial-gradient(var(--hx-ivory,var(--lime)) .8px,transparent 1.1px);background-size:4px 4px;opacity:.1;-webkit-mask-image:linear-gradient(160deg,#000,transparent 72%);mask-image:linear-gradient(160deg,#000,transparent 72%);pointer-events:none}
.hub-shell-gate .cartao{width:min(100%,420px);background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:28px;box-shadow:var(--elev-2,var(--shadow-lg));padding:32px 28px;animation:hub-shell-sobe .5s var(--ease-out,var(--ease)) both}
.hub-shell-gate .marca{color:var(--primary);margin-bottom:20px}
.hub-shell-gate .marca svg{height:30px;width:auto}
.hub-shell-gate h1{font-size:var(--fs-2xl);margin-bottom:6px}
.hub-shell-gate .sub{color:var(--text-2);font-size:13.5px;margin-bottom:18px}
.hub-shell-atalhos{display:flex;flex-direction:column;gap:2px}
.hub-shell-atalhos li{display:flex;align-items:center;gap:12px;padding:9px 4px;border-bottom:1px solid var(--line-soft);font-size:13.5px}
.hub-shell-atalhos li>span:first-child{flex:none;min-width:92px;display:flex;gap:4px;flex-wrap:wrap}

/* ----- paleta de comandos ----- */
html.hub-pal-lock{overflow:hidden}
.hub-pal{position:fixed;inset:0;z-index:calc(var(--z-dialog,90) + 5);display:flex;align-items:flex-start;justify-content:center;padding:clamp(56px,12vh,120px) 16px 16px;font-family:var(--font)}
.hub-pal-bk{position:absolute;inset:0;background:var(--hx-scrim,var(--overlay));animation:hub-fade .2s ease both}
.hub-pal-box{position:relative;width:min(680px,100%);max-height:min(620px,78vh);display:flex;flex-direction:column;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:28px;box-shadow:var(--elev-2,var(--shadow-lg));overflow:hidden;animation:hub-shell-sobe .25s var(--ease-out,var(--ease)) both}
.hub-pal-in{display:flex;align-items:center;gap:12px;padding:0 20px;height:68px;flex:none;border-bottom:1px solid var(--line)}
.hub-pal-in>svg.i{width:20px;height:20px;color:var(--muted)}
.hub-pal-q{flex:1;min-width:0;height:100%;background:transparent;border:0;outline:0;font-size:18px;font-weight:600;letter-spacing:-.02em;color:var(--text)}
.hub-pal-q::placeholder{color:var(--muted);font-weight:500}
.hub-pal-box:focus-within .hub-pal-in{box-shadow:inset 0 -2px 0 var(--focus)}
.hub-pal-x{display:none;width:44px;height:44px;margin-right:-10px;border-radius:50%;place-items:center;color:var(--text-2)}
.hub-pal-x:focus-visible,.hub-pal-chip:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.hub-pal-l{overflow-y:auto;padding:6px 10px 10px;flex:1;min-height:80px;overscroll-behavior:contain}
.hub-pal-g{padding:14px 12px 6px;font-size:10.5px;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:var(--muted)}
.hub-pal-i{display:flex;align-items:center;gap:14px;padding:9px 12px;min-height:54px;border-radius:18px;cursor:pointer;scroll-margin:40px 0}
.hub-pal-ic{width:36px;height:36px;border-radius:12px;background:var(--surface-2);display:grid;place-items:center;flex:none;color:var(--text-2)}
.hub-pal-ic svg.i{width:18px;height:18px}
.hub-pal-tx{min-width:0;flex:1}
.hub-pal-tx b{display:block;font-size:14.5px;font-weight:700;letter-spacing:-.015em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hub-pal-tx small{display:block;font-size:12px;font-weight:500;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hub-pal-tx mark{background:transparent;color:var(--primary);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px;text-decoration-color:var(--lime)}
.hub-pal-tag{flex:none;font-size:11px;font-weight:800;letter-spacing:.04em;padding:3px 9px;border-radius:99px;background:var(--surface-2);color:var(--text-2);border:1px solid var(--line)}
.hub-pal-ret{flex:none;opacity:0;display:grid;place-items:center}
.hub-pal-ret svg.i{width:16px;height:16px}
.hub-pal-i[aria-selected="true"]{background:var(--hx-g-bg,var(--teal-deep));color:var(--hx-g-fg,var(--lime));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--lime) 26%,transparent)}
.hub-pal-i[aria-selected="true"] .hub-pal-tx small{color:var(--hx-g-fg2,var(--side-text))}
.hub-pal-i[aria-selected="true"] .hub-pal-tx mark{color:var(--lime);text-decoration-color:var(--lime)}
.hub-pal-i[aria-selected="true"] .hub-pal-ic{background:var(--lime);color:var(--ink)}
.hub-pal-i[aria-selected="true"] .hub-pal-tag,.hub-pal-i[aria-selected="true"] .hub-shell-k{background:transparent;color:inherit;border-color:currentColor}
.hub-pal-i[aria-selected="true"] .hub-pal-ret{opacity:.85}
.hub-pal-i[aria-disabled="true"]{opacity:.62;cursor:not-allowed}
.hub-pal-vazio{padding:34px 20px 26px;text-align:center;display:flex;flex-direction:column;gap:6px;align-items:center}
.hub-pal-vazio b{font-size:15px;letter-spacing:-.02em;overflow-wrap:anywhere}
.hub-pal-vazio span{color:var(--muted);font-size:13px}
.hub-pal-sug{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;padding:14px 12px 6px;font-size:11px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:var(--muted)}
.hub-pal-chip{min-height:36px;padding:0 14px;border-radius:99px;border:1.5px solid var(--line-strong);color:var(--text);font-size:13px;font-weight:700;letter-spacing:0;text-transform:none}
.hub-pal-chip:hover{border-color:var(--text);background:var(--surface-2)}
.hub-pal-ft{display:flex;align-items:center;justify-content:space-between;gap:12px 18px;flex-wrap:wrap;flex:none;padding:11px 20px;border-top:1px solid var(--line);font-size:12px;color:var(--muted);font-weight:600}
.hub-pal-dicas{display:flex;gap:6px 18px;flex-wrap:wrap}
.hub-pal-dicas .hub-shell-k{margin-right:5px;padding:3px 6px;font-size:10.5px}

/* ----- botão Voltar ao Hub (todo módulo) ----- */
.hub-shell-voltar{display:inline-flex;align-items:center;gap:8px;flex:none;height:38px;padding:0 14px 0 11px;border:1px solid var(--line-strong);border-radius:var(--radius-pill,999px);background:var(--surface);color:var(--text);font-size:13px;font-weight:700;text-decoration:none;letter-spacing:-.01em;white-space:nowrap;transition:background .18s,border-color .18s,color .18s,transform .18s}
.hub-shell-voltar svg{width:17px;height:17px;flex:none;transition:transform .18s}
.hub-shell-voltar:hover{background:var(--lime);border-color:var(--lime);color:var(--ink)}
.hub-shell-voltar:hover svg{transform:translateX(-3px)}
.hub-shell-voltar:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.hub-shell-voltar-c{display:none}
.hub-shell-host.mod .hub-shell-selo{display:none}
@media (prefers-reduced-motion:reduce){.hub-shell-voltar,.hub-shell-voltar svg{transition:none}.hub-shell-voltar:hover svg{transform:none}}

/* ----- tablet e celular ----- */
@media (max-width:1100px){.hub-shell-nome{display:none}.hub-shell-user{padding:0 10px 0 7px}}
@media (max-width:760px){
  .hub-shell-in{min-height:var(--top-h-m,62px);gap:8px}
  .hub-shell-nav{gap:8px}
  .hub-shell-selo,.hub-shell-modnome,.hub-shell-nome,.hub-shell-pbusca-t,.hub-shell-pbusca .hub-shell-k{display:none}
  .hub-shell-logo svg{height:23px}
  .hub-shell-voltar{height:40px;padding:0 12px 0 9px;gap:6px}
  .hub-shell-voltar-l{display:none}
  .hub-shell-voltar-c{display:inline}
  .hub-shell-pill{width:44px;padding:0;justify-content:center;gap:0}
  .hub-shell-pill .hub-shell-chev{display:none}
  .hub-shell-pbusca{flex:none;width:44px;padding:0;justify-content:center}
  .hub-shell-acoes{gap:6px}
  .hub-shell-user{padding:0 8px 0 5px}
  .hub-shell-user .hub-shell-chev{display:none}
  .hub-shell-user{width:44px;padding:0;justify-content:center}
  .hub-shell-ancora{position:static}
  .hub-shell-pop,.hub-shell-pop.dir{position:absolute;left:12px;right:12px;top:calc(100% + 8px);width:auto;max-height:calc(100vh - var(--top-h-m,62px) - 24px);max-height:calc(100dvh - var(--top-h-m,62px) - 24px)}
  .hub-shell-faixa-in{flex-wrap:wrap;padding-top:8px;padding-bottom:8px}
  .hub-shell-faixa-t{flex-basis:calc(100% - 44px)}
  .hub-shell-gate .cartao{padding:26px 20px}
  .hub-pal{padding-top:16px;padding-left:12px;padding-right:12px}
  .hub-pal-box{max-height:calc(100vh - 28px);border-radius:24px}
  .hub-pal-in{padding:0 16px;height:62px}
  .hub-pal-x{display:grid}
  .hub-pal-esc,.hub-pal-dicas{display:none}
  .hub-pal-ft{padding:9px 16px}
  .hub-pal-ret,.hub-shell-mod>.hub-shell-k{display:none}
}
@media (max-width:360px){.hub-shell-selo{display:none}.hub-shell-logo svg{height:20px}}

/* Celular estreito (390 px e menos): a barra de um módulo leva logo, voltar, módulos, busca, sino, tema e conta; sem este ajuste ela passava da borda em cerca de 50 px.
   O voltar vira só a seta (o nome continua no aria-label e no title) e os espaços encolhem; os alvos de toque seguem com 44 px. */
@media (max-width:430px){
  .hub-shell-in{gap:4px;padding-left:10px;padding-right:10px}
  .hub-shell-nav{gap:4px}
  .hub-shell-acoes{gap:4px}
  .hub-shell-logo svg{height:20px}
  .hub-shell-voltar{width:40px;height:40px;padding:0;justify-content:center;gap:0}
  .hub-shell-voltar-c{display:none}
  .hub-shell-fill{flex:0 1 0}
}
@media (max-width:360px){
  .hub-shell-ib,.hub-shell-pill,.hub-shell-user,.hub-shell-pbusca{width:40px;height:40px}
}

@media (prefers-reduced-motion:reduce){
  .hub-shell *,.hub-shell-pop,.hub-shell-pop::before,.hub-shell-pop::after,.hub-shell-gate .cartao,.hub-pal-bk,.hub-pal-box,.hub-pal-box *{animation:none!important;transition:none!important}
}
@media print{.hub-shell-host,.hub-pal,.hub-shell-gate{display:none!important}}

/* celular: 44 px de alvo de toque no aviso de modo aberto e na logo, como promete o cabeçalho deste arquivo */
@media (max-width:700px){
.hub-shell-faixa-x{min-width:44px;min-height:44px}
.hub-shell-faixa-b{min-height:44px}
.hub-shell-logo{display:inline-flex;align-items:center;min-height:44px}
}

/* ----- multiempresa: seletor de empresa (chip) e faixa de visita ----- */
.hub-shell-emp-slot{display:contents}
.hub-shell-emp{position:relative;flex:none}
.hub-shell-emp-strip{display:none;position:relative}
.hub-shell-empb{display:inline-flex;align-items:center;gap:8px;height:44px;max-width:230px;padding:0 12px 0 14px;border-radius:var(--radius-pill,999px);border:1px solid var(--line-strong);background:transparent;color:var(--text);font-weight:700;font-size:13px;white-space:nowrap;transition:border-color var(--dur),background-color var(--dur)}
.hub-shell-empb:hover,.hub-shell-empb[aria-expanded="true"]{border-color:var(--text);background:var(--surface)}
.hub-shell-empb:focus-visible,.hub-shell-visita-b:focus-visible,.hub-shell-emp .hub-shell-mi:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.hub-shell-edot{--ec:var(--primary);flex:none;width:12px;height:12px;border-radius:50%;background:var(--ec);border:1.5px solid var(--line-hot)}
.hub-shell-emp-n{min-width:0;overflow:hidden;text-overflow:ellipsis}
.hub-shell-emp-v{flex:none;font-size:10.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;padding:2px 7px;border-radius:99px;background:var(--info-bg);color:var(--info)}
.hub-shell-emp.visita .hub-shell-empb{border-color:var(--info);background:var(--info-bg)}
.hub-shell-emp.lib .hub-shell-empb{border-color:var(--warn);background:var(--warn-bg)}
.hub-shell-emp.lib .hub-shell-emp-v{background:var(--surface);color:var(--warn)}
.hub-shell-emp .hub-shell-pop{width:min(360px,calc(100vw - 24px))}
/* tablet em pé (761 a 1000 px) COM o chip: a barra cede espaço (busca vira botão, selo e nome do módulo saem) para não gerar rolagem horizontal; sem chip nada muda */
@media (min-width:761px) and (max-width:1000px){
  .hub-shell-in:has(.hub-shell-emp-slot .hub-shell-emp){gap:8px}
  .hub-shell-in:has(.hub-shell-emp-slot .hub-shell-emp) .hub-shell-selo,
  .hub-shell-in:has(.hub-shell-emp-slot .hub-shell-emp) .hub-shell-modnome,
  .hub-shell-in:has(.hub-shell-emp-slot .hub-shell-emp) .hub-shell-pbusca-t,
  .hub-shell-in:has(.hub-shell-emp-slot .hub-shell-emp) .hub-shell-pbusca .hub-shell-k{display:none}
  .hub-shell-in:has(.hub-shell-emp-slot .hub-shell-emp) .hub-shell-pbusca{flex:none;width:44px;padding:0;justify-content:center}
  .hub-shell-in:has(.hub-shell-emp-slot .hub-shell-emp) .hub-shell-empb{max-width:150px}
}
.hub-shell-emp-av{--ec:var(--primary);font-size:12px;font-weight:800;letter-spacing:.02em;color:var(--text);background:color-mix(in srgb,var(--ec) 18%,var(--surface));border:1.5px solid color-mix(in srgb,var(--ec) 55%,var(--line))}
.hub-shell-emp .hub-shell-mi[aria-current="true"]{background:var(--primary-soft)}
.hub-shell-emp-ok{flex:none;width:18px;height:18px;color:var(--pos)}

.hub-shell-visita{background:var(--info-bg);color:var(--info);border-bottom:1px solid var(--line);font-size:13px;font-weight:600}
.hub-shell-visita.lib{background:var(--warn-bg);color:var(--warn)}
.hub-shell-visita-in{display:flex;align-items:center;gap:8px 12px;max-width:calc(var(--hx-wrap,1440px) + 2 * var(--hub-shell-pad));margin:0 auto;padding:7px var(--hub-shell-pad);min-height:48px}
.hub-shell-host.mod .hub-shell-visita-in{max-width:none}
.hub-shell-visita-ic{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:color-mix(in srgb,currentColor 16%,transparent);flex:none}
.hub-shell-visita-t{flex:1;min-width:0;line-height:1.35}
.hub-shell-visita-st{display:inline-block;margin-left:8px;padding:1px 9px;border-radius:99px;border:1.5px solid currentColor;font-size:11px;font-weight:800;white-space:nowrap}
.hub-shell-visita-a{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.hub-shell-visita-b{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:0 14px;border-radius:99px;border:1.5px solid currentColor;background:transparent;font-weight:800;font-size:12.5px;color:inherit;white-space:nowrap}
.hub-shell-visita-b:hover{background:color-mix(in srgb,currentColor 14%,transparent)}
.hub-shell-visita-b.pri{background:var(--info);border-color:var(--info);color:var(--surface)}
.hub-shell-visita.lib .hub-shell-visita-b.pri{background:var(--warn);border-color:var(--warn)}
@media (max-width:760px){
  .hub-shell-emp-slot{display:none}
  .hub-shell-emp-strip{display:block;padding:0 var(--hub-shell-pad)}
  .hub-shell-emp-strip:empty,.hub-shell-host.visita .hub-shell-emp-strip{display:none}
  .hub-shell-emp-strip .hub-shell-emp{display:block;padding:4px 0 8px}
  .hub-shell-emp-strip .hub-shell-empb{width:100%;max-width:none;height:44px;justify-content:flex-start}
  .hub-shell-emp-strip .hub-shell-empb .hub-shell-chev{margin-left:auto}
  .hub-shell-emp .hub-shell-pop{position:absolute;left:0;right:0;top:calc(100% - 4px);width:auto}
  .hub-shell-visita-in{flex-wrap:wrap;padding-top:8px;padding-bottom:8px}
  .hub-shell-visita-t{flex-basis:calc(100% - 40px)}
  .hub-shell-visita-a{flex:1 0 100%}
  .hub-shell-visita-a .hub-shell-visita-b{flex:1 1 140px;min-height:44px}
}
