/* ===== Gestão VBM · menu fluido + visão gerencial (2026-11-24) ===== */

/* --- Menu vertical fluido --- */
.sidebar { --glide: cubic-bezier(.34, 1.56, .64, 1); }
.sidebar .nav-glider {
  position: absolute; left: 50%; width: 46px; height: 46px; margin-left: -23px; top: 0;
  border-radius: 13px; background: var(--gold-dim); box-shadow: inset 0 0 0 1px #f0c52e59, 0 6px 18px #f0c52e26;
  transition: transform .5s var(--glide), opacity .25s ease, height .3s ease;
  pointer-events: none; z-index: 0; opacity: 0;
}
.sidebar .nav-glider.on { opacity: 1; }
.sidebar .nav-item { z-index: 1; transition: color .25s ease, background-color .25s ease; }
.sidebar.fx-ready .nav-item.active { background: transparent; box-shadow: none; }
.sidebar .nav-item svg { transition: transform .35s var(--glide); }
.sidebar .nav-item:hover svg { transform: scale(1.14) translateY(-1px); }
.sidebar .nav-item.active svg { transform: scale(1.1); }
.sidebar .nav-item:active svg { transform: scale(.9); }
.sidebar .nav-item .tip { transition: opacity .18s ease, transform .28s var(--glide); }
.sidebar .logo { transition: transform .35s var(--glide), box-shadow .3s ease; }
.sidebar .logo:hover { transform: rotate(-6deg) scale(1.06); }
.sidebar.fx-boot .nav-item, .sidebar.fx-boot .logo, .sidebar.fx-boot .nav-sep {
  animation: fxRail .55s var(--glide) both; animation-delay: calc(var(--i, 0) * 28ms);
}
@keyframes fxRail { from { opacity: 0; transform: translateX(-14px) scale(.85); } }

/* --- Transição de página --- */
.main .topbar h1 { transition: opacity .25s ease; }
.fx-page { animation: fxPage .5s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes fxPage { from { opacity: 0; transform: translateY(10px); filter: blur(6px); } }
.fx-item { animation: fxItem .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--d, 0) * 45ms); }
@keyframes fxItem { from { opacity: 0; transform: translateY(16px) scale(.985); filter: blur(4px); } }
.main .card, .main .post, .main .event, .main .celeb { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.main .card.mgr-kpi:hover, .main .post:hover, .main .event:hover, .main .celeb:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.main .card.mgr-kpi:hover { border-color: var(--kc, var(--gold)); }

@media (prefers-reduced-motion: reduce) {
  .fx-page, .fx-item, .sidebar.fx-boot * { animation: none !important; }
  .sidebar .nav-glider { transition: none; }
}

/* --- Seja bem-vindo (topo direito) --- */
.welcome-chip { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; margin-right: 8px; padding-right: 14px; border-right: 1px solid var(--border); }
.welcome-chip span { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.welcome-chip b { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-weight: 600; font-size: 21px; color: var(--gold); }

/* --- Visão gerencial (página inicial) --- */
.mgr-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.mgr-kpi { text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 6px; padding: 16px; border-top: 3px solid var(--kc, var(--gold)); color: var(--text); font: inherit; }
.mgr-kpi .mgr-l { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.mgr-kpi .mgr-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--kc); background: color-mix(in srgb, var(--kc) 16%, transparent); }
.mgr-kpi .mgr-v { font-size: 30px; font-weight: 900; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
/* Reorganização das colunas (sem mexer no código do sistema) */
body.fx-home .topbar h1 { font-size: 0; gap: 0; }
body.fx-home .topbar h1 > * { display: none; }
body.fx-home .topbar h1::after { content: 'Visão gerencial'; font-size: 23px; }
body.fx-home .dash-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 340px; }
body.fx-home .dash-grid > .col-center-expanded { order: 1; min-height: 0; }
body.fx-home .dash-grid > .col-3 { order: 2; }
body.fx-home .dash-grid > .col:not(.col-center-expanded):not(.col-3) { order: 3; }
body.fx-home .dash-grid > .col-3 > div:has(.team-status) { order: -2; }
body.fx-home .dash-grid > .col-3 > div:has(.event), body.fx-home .dash-grid > .col-3 > div:has(.card.empty) { order: -1; }
/* Quadro de avisos: ocupa a largura, 1 aviso = largura toda, 2 = metade cada, 3+ = rolagem lateral */
body.fx-home .col-center-expanded { min-height: 0; }
body.fx-home .col-center-expanded > div:has(.posts-vertical) { flex: 1; display: flex; flex-direction: column; }
body.fx-home .col-center-expanded .posts-vertical {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 16px) / 2); gap: 16px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 2px 2px 12px; flex: 1; align-items: stretch;
  scrollbar-width: thin; scrollbar-color: var(--gold) var(--track-bg);
}
body.fx-home .col-center-expanded .posts-vertical:has(> .post:only-child) { grid-auto-columns: 100%; }
body.fx-home .col-center-expanded .posts-vertical > .post { scroll-snap-align: start; min-height: 360px; padding: 20px; }
body.fx-home .col-center-expanded .posts-vertical > .post h4 { font-size: 17px; }
body.fx-home .col-center-expanded .posts-vertical > .post p { flex: 1; font-size: 14px; }
body.fx-home .col-center-expanded .post .cover { height: 120px !important; font-size: 52px !important; }
body.fx-home .col-center-expanded .posts-vertical::-webkit-scrollbar { height: 8px; }
body.fx-home .col-center-expanded .posts-vertical::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 8px; }
body.fx-home .col-center-expanded .posts-vertical::-webkit-scrollbar-track { background: var(--track-bg); border-radius: 8px; }
body.fx-home .col-3 .celebs { grid-auto-columns: 140px; }
@media (width <= 1500px) { .mgr-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (width <= 1350px) {
  body.fx-home .dash-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  body.fx-home .dash-grid > .col:not(.col-center-expanded):not(.col-3) { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
  body.fx-home .dash-grid > .col-3 { grid-column: auto; display: flex; }
}
@media (width <= 900px) {
  body.fx-home .dash-grid, body.fx-home .dash-grid > .col:not(.col-center-expanded):not(.col-3) { grid-template-columns: 1fr; }
  .mgr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.fx-home .col-center-expanded .posts-vertical { grid-auto-columns: 88%; } .welcome-chip { display: none; }
}
