/* ==========================================================================
   GCH - MENU UNICO - menu.css  [rev: fixnav]
   Preserva o design system (Tailwind slate/dark). Apenas estrutura do menu.
   ========================================================================== */

#sidebar.gch-aside{
  display:flex; flex-direction:column;
  padding:0; overflow:hidden;
}

/* ---------- LOGO GRANDE NO TOPO ---------- */
.gch-brand{
  flex:0 0 auto;
  display:flex; align-items:center; justify-content:center;
  padding:22px 16px 18px;
  border-bottom:1px solid rgba(148,163,184,.18);
  background:linear-gradient(180deg, rgba(59,130,246,.06), transparent);
}
.gch-logo{
  max-height:108px; max-width:92%; width:auto; height:auto;
  object-fit:contain; display:block;
  filter:drop-shadow(0 2px 6px rgba(0,0,0,.25));
}
.gch-logo-fallback{
  width:64px;height:64px;border-radius:16px;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#3b82f6,#6366f1);color:#fff;font-size:26px;
}

/* ---------- CORPO ROLAVEL ---------- */
.gch-scroll{
  flex:1 1 auto; overflow-y:auto; overflow-x:hidden;
  padding:10px 10px 6px;
  scrollbar-width:thin;
}
.gch-scroll::-webkit-scrollbar{ width:6px; }
.gch-scroll::-webkit-scrollbar-thumb{ background:rgba(148,163,184,.35); border-radius:8px; }

.gch-loose{ margin-bottom:6px; }

/* ---------- SECOES ---------- */
.gch-section{
  position:relative;
  background:var(--gch-panel, #0f172a);
  transition:transform .3s cubic-bezier(.4,0,.2,1), box-shadow .3s;
}
:root:not(.dark) .gch-section{ background:#ffffff; }
.gch-section-title{
  font-size:10.5px; font-weight:700; letter-spacing:.09em; text-transform:uppercase;
  color:#94a3b8; padding:8px 10px 4px;
}

/* ---------- LINKS ---------- */
.gch-link{
  display:flex; align-items:center; gap:11px;
  width:100%; text-align:left;
  padding:9px 11px; margin:2px 0;
  border-radius:10px; cursor:pointer;
  color:#cbd5e1; font-size:14px; font-weight:500;
  background:transparent; border:0;
  transition:background .18s, color .18s, transform .08s;
  text-decoration:none;
}
.gch-link:hover{ background:rgba(148,163,184,.14); color:#fff; }
.gch-link:active{ transform:scale(.985); }
.gch-link.gch-active{ background:rgba(59,130,246,.18); color:#fff; box-shadow:inset 3px 0 0 #3b82f6; }
.gch-ic{ width:20px; text-align:center; font-size:15px; flex:0 0 auto; opacity:.9; }
.gch-lbl{ flex:1 1 auto; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.gch-sub{ padding-left:34px; font-size:13.5px; }

/* ---------- BADGES MASTER/ADM ---------- */
.gch-badge{
  font-size:9px; font-weight:800; letter-spacing:.05em;
  padding:2px 6px; border-radius:999px; margin-left:auto;
}
.gch-badge-adm{ background:rgba(168,85,247,.22); color:#c4b5fd; border:1px solid rgba(168,85,247,.4); }
/* ADM badge menor e discreto */
.gch-badge.gch-badge-adm{ font-size:8px !important; font-weight:700 !important; letter-spacing:.03em !important; padding:1px 6px !important; background:rgba(168,85,247,.10) !important; color:rgba(196,181,253,.82) !important; border:1px solid rgba(168,85,247,.25) !important; }

.gch-badge-master{ background:rgba(234,179,8,.2); color:#fde68a; border:1px solid rgba(234,179,8,.4); }
/* Badge PRO (upsell) - itens exclusivos do plano PRO no menu do Cliente */
.gch-badge-pro{ background:rgba(245,158,11,.2); color:#fbbf24; border:1px solid rgba(245,158,11,.3); }
.gch-badge.gch-badge-pro{ font-size:10px !important; font-weight:700 !important; letter-spacing:.03em !important; padding:2px 6px !important; border-radius:6px !important; }
/* ---------- MODO CLARO: legibilidade dos links do menu ---------- */
:root:not(.dark) .gch-link{ color:#334155; }
:root:not(.dark) .gch-link:hover{ background:rgba(59,130,246,.10); color:#1d4ed8; }
:root:not(.dark) .gch-link.gch-active{ background:rgba(59,130,246,.14); color:#1d4ed8; }
:root:not(.dark) .gch-section-title{ color:#64748b; }

/* built-css-1 */

/* ---------- ACORDEAO (submenus) ---------- */
.gch-acc-head{ position:relative; }
.gch-chev{ margin-left:auto; font-size:11px; opacity:.7; transition:transform .28s; }
.gch-acc.gch-open .gch-chev{ transform:rotate(180deg); }
.gch-acc-body{
  max-height:0; overflow:hidden;
  transition:max-height .32s ease;
}
.gch-acc.gch-open .gch-acc-body{ max-height:520px; }

/* ---------- DIVISORIAS COLORIDAS ---------- */
.gch-divider{
  display:flex; align-items:center; gap:8px;
  padding:10px 8px; margin:6px 2px;
  cursor:pointer; user-select:none;
  border-radius:8px;
  position:relative;
  background:var(--gch-panel, #0f172a);
  transition:background .2s, transform .3s cubic-bezier(.4,0,.2,1);
}
:root:not(.dark) .gch-divider{ background:#ffffff; }
.gch-divider:hover{ background:rgba(148,163,184,.08); }
.gch-divider-line{ flex:1 1 auto; height:2px; border-radius:2px; }
.gch-divider-grip{
  flex:0 0 auto; width:26px; height:20px;
  display:flex; align-items:center; justify-content:center;
  border-radius:6px; font-size:10px; color:#fff;
}
/* azul: Usuario <-> Administrativo */
.gch-divider-blue .gch-divider-line{ background:linear-gradient(90deg,transparent,#3b82f6,transparent); }
.gch-divider-blue .gch-divider-grip{ background:#3b82f6; box-shadow:0 0 10px rgba(59,130,246,.6); }
/* roxo: Administrativo <-> Desenvolvedor */
.gch-divider-purple .gch-divider-line, .gch-divider-dev .gch-divider-line{ background:linear-gradient(90deg,transparent,#a855f7,transparent); }
.gch-divider-purple .gch-divider-grip, .gch-divider-dev .gch-divider-grip{ background:#a855f7; box-shadow:0 0 10px rgba(168,85,247,.6); }
.gch-divider-active .gch-divider-grip{ transform:scale(1.12); }

/* ---------- SOBREPOSICAO DESLIZANTE DA SECAO ---------- */
/* Secao sobreposta: sobe em bloco (aberta) cobrindo os niveis acima, logo abaixo da pilha de divisorias */
.gch-section.gch-sec-overlay{
  z-index:30;
  box-shadow:0 12px 26px -10px rgba(0,0,0,.55);
}
/* Secao fechada embaixo: totalmente oculta para nao atrapalhar a leitura da parte de cima */
.gch-section.gch-sec-hidden{
  opacity:0;
  visibility:hidden;
  transition:opacity .3s cubic-bezier(.4,0,.2,1), visibility .3s;
}
/* divisoria inativa embaixo da sobreposicao: tambem fica oculta */
.gch-divider.gch-divider-hidden{
  opacity:0;
  visibility:hidden;
  transition:opacity .3s cubic-bezier(.4,0,.2,1), visibility .3s;
}
/* divisoria ativa/empilhada acompanha o topo, acima do conteudo coberto */
.gch-divider.gch-divider-active,
.gch-divider.gch-divider-stacked{
  z-index:31;
  box-shadow:0 8px 18px -10px rgba(0,0,0,.5);
}
.gch-divider.gch-divider-active .gch-divider-grip{
  opacity:.9;
  transform:rotate(180deg);
  transition:transform .3s cubic-bezier(.4,0,.2,1), opacity .3s;
}
/* enquanto houver sobreposicao: fundo solido no scroll e item solto do topo coberto */
.gch-scroll.gch-has-overlay{ background:var(--gch-panel, #0f172a); }
:root:not(.dark) .gch-scroll.gch-has-overlay{ background:#ffffff; }
.gch-scroll.gch-has-overlay > .gch-loose{ visibility:hidden; }
/* divisorias empilhadas encostam no topo sem folga */
.gch-divider.gch-divider-stacked{ margin-top:0 !important; padding-top:14px; }

/* ---------- RODAPE FIXO ---------- */
.gch-foot{
  flex:0 0 auto;
  padding:10px; border-top:1px solid rgba(148,163,184,.18);
  display:flex; flex-direction:column; gap:4px;
  background:inherit;
}
.gch-logout{ color:#f87171; }
.gch-logout:hover{ background:rgba(239,68,68,.14); color:#fca5a5; }
/* built-css-2 */

/* ---------- MENU RECOLHIDO ---------- */
#sidebar.gch-collapsed{ width:76px !important; }
#sidebar.gch-collapsed .gch-lbl,
#sidebar.gch-collapsed .gch-badge,
#sidebar.gch-collapsed .gch-chev,
#sidebar.gch-collapsed .gch-section-title,
#sidebar.gch-collapsed .gch-divider-line{ display:none; }
#sidebar.gch-collapsed .gch-link{ justify-content:center; padding:10px 0; }
#sidebar.gch-collapsed .gch-logo{ max-height:52px; }
#sidebar.gch-collapsed .gch-acc-body{ max-height:0 !important; }

/* ---------- FLASH DE ANCORA (subpaginas Admin/Dev) ---------- */
.gch-anchor-flash{
  animation:gchAnchor 1.6s ease;
  border-radius:12px;
}
@keyframes gchAnchor{
  0%{ box-shadow:0 0 0 3px rgba(59,130,246,.0); }
  25%{ box-shadow:0 0 0 3px rgba(59,130,246,.7); }
  100%{ box-shadow:0 0 0 3px rgba(59,130,246,0); }
}

/* ---------- TELAS VIRTUAIS DEV ---------- */
.gch-dev-wrap{ max-width:1000px; }
.gch-dev-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:12px; }
.gch-dev-card{ background:rgba(148,163,184,.08); border:1px solid rgba(148,163,184,.18); border-radius:12px; padding:14px; }
.gch-dev-k{ font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:#94a3b8; margin-bottom:6px; }
.gch-dev-v{ font-size:15px; font-weight:600; word-break:break-word; }
.gch-dev-toolbar{ margin-bottom:12px; }
.gch-dev-input{ width:100%; max-width:360px; padding:9px 12px; border-radius:10px; border:1px solid rgba(148,163,184,.3); background:transparent; color:inherit; }
.gch-dev-inspect{ display:flex; flex-direction:column; gap:6px; }
.gch-insp-row{ display:grid; grid-template-columns:minmax(180px,260px) 1fr; gap:12px; padding:9px 12px; border-radius:8px; background:rgba(148,163,184,.06); border:1px solid rgba(148,163,184,.12); }
.gch-insp-k{ font-weight:600; font-size:13px; color:#93c5fd; word-break:break-all; }
.gch-insp-v{ font-size:12.5px; color:#cbd5e1; word-break:break-all; font-family:ui-monospace,monospace; }
.gch-insp-empty{ color:#94a3b8; padding:16px; }

/* esconde qualquer residuo do menu legado dentro do aside */
#sidebar.gch-aside nav.gdm-navgroup,
#sidebar.gch-aside .gdm-navsep,
#sidebar.gch-aside .gdm-dsep,
#sidebar.gch-aside #gchDevNavSep,
#sidebar.gch-aside #gchDevNavGroup{ display:none !important; }
