/* ============================================================
   FS Shell — barra de módulos + Central de Mensagens.
   Compartilhado entre SII/SCE/Hub (duplicado por módulo, mesmo
   motivo do shared/fs-tokens.css — ver docs/decisoes-tecnicas.md,
   ADR-002 e o ADR novo do FS Shell).
   Usa só as variáveis de shared/fs-tokens.css, não redefine tema.
   ============================================================ */
:root{ --fsshell-h: 0px; }

/* Empurra os headers próprios de cada módulo para baixo do FS Shell
   quando eles também são sticky (hoje: sii .topbar, hub .hub-top).
   !important é necessário porque este arquivo carrega antes do <style>
   de cada página, que declara top:0 com a mesma especificidade. */
.topbar, .hub-top{ top: var(--fsshell-h) !important; }

.fsshell{
  position:sticky; top:0; z-index:200;
  background:var(--ink); color:var(--paper2);
  font-family:var(--font-sans);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.fsshell-wrap{
  max-width:1180px; margin:0 auto; padding:.55rem 1rem;
  display:flex; align-items:center; gap:.75rem;
}
.fsshell-brand{
  display:flex; align-items:center; gap:.5rem; background:none; border:0; cursor:pointer;
  color:var(--paper2); font:inherit; padding:.3rem .5rem; border-radius:var(--r,8px);
}
.fsshell-brand:hover, .fsshell-brand:focus-visible{ background:rgba(255,255,255,.08); }
.fsshell-mono{ font-family:var(--font-mono); font-weight:700; color:var(--brass-l); letter-spacing:.03em; }
.fsshell-modulo{ font-weight:700; font-size:.85rem; }
.fsshell-chevron{ font-size:.65rem; opacity:.75; transition:transform .15s var(--ease,ease); }
.fsshell-brand[aria-expanded="true"] .fsshell-chevron{ transform:rotate(180deg); }

.fsshell-menu{
  position:absolute; top:100%; left:1rem; margin-top:.4rem; min-width:15.5rem;
  background:var(--paper); color:var(--ink); border-radius:var(--r-md,12px);
  box-shadow:0 18px 40px -20px rgba(10,10,10,.4); border:1px solid var(--paper3);
  padding:.4rem; display:flex; flex-direction:column; gap:.15rem;
}
.fsshell-menu[hidden]{ display:none; }
.fsshell-item{
  display:flex; align-items:center; justify-content:space-between; gap:.6rem;
  padding:.5rem .6rem; border-radius:var(--r,8px); text-decoration:none; color:var(--ink2);
  font-size:.85rem;
}
.fsshell-item:hover, .fsshell-item:focus-visible{ background:var(--paper2); }
.fsshell-item.is-atual{ background:rgba(74,143,212,.1); cursor:default; }
.fsshell-item.is-indisponivel{ opacity:.55; cursor:default; pointer-events:none; }
.fsshell-item-nome{ display:flex; flex-direction:column; gap:.1rem; }
.fsshell-item-sigla{ display:block; font-weight:700; font-size:.85rem; color:var(--ink2); }
.fsshell-item-status{ font-size:.65rem; text-transform:uppercase; letter-spacing:.04em; font-weight:700; white-space:nowrap; display:flex; align-items:center; gap:.35em; }
.fsshell-dot{ width:6px; height:6px; border-radius:50%; display:inline-block; }
.fsshell-dot.status-ativo{ background:var(--brass-l); }
.fsshell-dot.status-constr{ background:var(--warn); }
.fsshell-dot.status-roadmap{ background:var(--paper3); border:1px solid var(--gray-2); }

.fsshell-actions{ margin-left:auto; display:flex; align-items:center; gap:.5rem; }
.fsshell-novidades{
  background:none; border:1px solid rgba(255,255,255,.25); color:var(--paper2);
  font:inherit; font-size:.72rem; border-radius:var(--r-pill,999px); padding:.35em .8em; cursor:pointer;
}
.fsshell-novidades:hover, .fsshell-novidades:focus-visible{ border-color:var(--brass-l); }
.fsshell-changelog{
  position:absolute; top:100%; right:1rem; margin-top:.4rem; width:16.5rem;
  background:var(--paper); color:var(--ink2); border-radius:var(--r-md,12px);
  box-shadow:0 18px 40px -20px rgba(10,10,10,.4); border:1px solid var(--paper3);
  padding:.8rem .9rem; font-size:.8rem;
}
.fsshell-changelog[hidden]{ display:none; }
.fsshell-changelog h3{ margin:0 0 .4rem; font-size:.78rem; text-transform:uppercase; letter-spacing:.05em; color:var(--gray-3); }
.fsshell-changelog ul{ margin:0; padding-left:1.1rem; display:flex; flex-direction:column; gap:.35rem; }

.fsshell-msg{
  background:var(--brass-l); color:var(--ink); border:0; font:inherit; font-weight:700;
  font-size:.78rem; border-radius:var(--r-pill,999px); padding:.45em 1em; cursor:pointer;
}
.fsshell-msg:hover, .fsshell-msg:focus-visible{ filter:brightness(1.08); }

.fsshell-overlay{
  position:fixed; inset:0; background:rgba(10,10,10,.45); z-index:210;
}
.fsshell-overlay[hidden]{ display:none; }

.fsshell-msgpanel{
  position:fixed; top:0; right:0; bottom:0; width:min(26rem,92vw); z-index:220;
  background:var(--paper); color:var(--ink2); display:flex; flex-direction:column;
  box-shadow:-18px 0 40px -20px rgba(10,10,10,.45);
}
.fsshell-msgpanel[hidden]{ display:none; }
.fsshell-msgpanel-head{
  display:flex; align-items:center; justify-content:space-between; gap:.6rem;
  padding:1rem 1.1rem; border-bottom:1px solid var(--paper3);
}
.fsshell-msgpanel-head h2{ margin:0; font-family:var(--font-serif); font-size:1.15rem; color:var(--ink); }
.fsshell-msgpanel-fechar{
  background:none; border:1px solid var(--paper3); border-radius:50%; width:2.1rem; height:2.1rem;
  cursor:pointer; color:var(--ink2); font-size:.95rem;
}
.fsshell-msgpanel-body{ padding:1.1rem; overflow-y:auto; flex:1; display:flex; flex-direction:column; gap:.9rem; font-size:.88rem; line-height:1.55; }
.fsshell-msgpanel-body p{ margin:0; }
.fsshell-msgpanel-body details{ border:1px solid var(--paper3); border-radius:var(--r,8px); padding:.6rem .8rem; }
.fsshell-msgpanel-body summary{ cursor:pointer; font-weight:700; font-size:.82rem; }
.fsshell-msgpanel-body ol{ margin:.6rem 0 0; padding-left:1.2rem; display:flex; flex-direction:column; gap:.4rem; }

.fsshell-inbox-item{ border:1px solid var(--paper3); border-radius:var(--r,8px); padding:.6rem .7rem; text-align:left; background:none; width:100%; cursor:pointer; font:inherit; color:inherit; }
.fsshell-inbox-item:hover, .fsshell-inbox-item:focus-visible{ border-color:var(--brass-l); }
.fsshell-inbox-de{ font-weight:700; font-size:.82rem; }
.fsshell-inbox-assunto{ font-size:.82rem; margin-top:.15rem; }
.fsshell-inbox-prevista{ font-size:.75rem; color:var(--gray-3); margin-top:.15rem; }

@media (prefers-reduced-motion: reduce){
  .fsshell-chevron{ transition:none; }
}
