/* Menu lateral compacto (aplicado só com o menu expandido; o modo recolhido continua igual). */

body:not(.sidebar-collapsed) .sidebar { gap: 10px; padding: 16px 12px 12px; }
body:not(.sidebar-collapsed) .brand-card { min-height: 64px; padding: 10px 14px; border-radius: 16px; }
body:not(.sidebar-collapsed) .brand-title { font-size: 19px; margin-top: 6px; }
body:not(.sidebar-collapsed) .system-logo:not(.hidden) { max-height: 40px; }

/* busca de telas */
.menu-search { display: flex; align-items: center; gap: 8px; margin: 0 2px; border: 1px solid rgba(148, 163, 184, 0.16); border-radius: 10px; background: rgba(255, 255, 255, 0.04); padding: 0 10px; }
.menu-search svg { width: 15px; height: 15px; flex: none; stroke: #7c8aa5; fill: none; stroke-width: 2; stroke-linecap: round; }
.menu-search input { flex: 1; min-width: 0; height: 34px; border: 0; outline: 0; background: transparent; color: #e2e8f0; font: inherit; font-size: 13px; }
.menu-search input::placeholder { color: #7c8aa5; }
.menu-search kbd { font: 600 10px/1 inherit; font-family: inherit; color: #7c8aa5; border: 1px solid rgba(148, 163, 184, 0.25); border-radius: 5px; padding: 3px 5px; }
.menu-search:focus-within { border-color: rgba(34, 211, 238, 0.55); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12); }
body.sidebar-collapsed .menu-search { display: none; }
.menu-search-empty { display: none; padding: 8px 12px; color: #7c8aa5; font-size: 12px; }
.menu-searching .menu-search-empty.show { display: block; }

/* grupos */
body:not(.sidebar-collapsed) .nav-group { gap: 2px; padding: 4px 2px 10px; }
body:not(.sidebar-collapsed) .nav-section { gap: 0; }
body:not(.sidebar-collapsed) .nav-section-toggle {
  gap: 10px; justify-content: flex-start; border-radius: 9px; padding: 7px 8px;
  color: #e2e8f0; font-size: 13px; font-weight: 650; letter-spacing: 0; text-transform: none;
}
body:not(.sidebar-collapsed) .nav-section-toggle:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.nav-group-icon { display: none; }
body:not(.sidebar-collapsed) .nav-group-icon { display: inline-grid; width: 28px; height: 28px; flex: none; place-items: center; border-radius: 8px; background: rgba(148, 163, 184, 0.12); color: #cbd5e1; }
body:not(.sidebar-collapsed) .nav-group-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
body:not(.sidebar-collapsed) .nav-section-toggle > span:not(.nav-group-icon):not(.nav-section-arrow) { flex: 1; }
body:not(.sidebar-collapsed) .nav-section-arrow { font-size: 12px; transform: rotate(180deg); color: #7c8aa5; }
body:not(.sidebar-collapsed) .nav-section-collapsed .nav-section-arrow { transform: rotate(90deg); }
body:not(.sidebar-collapsed) .nav-section:not(.nav-section-collapsed) > .nav-section-toggle { color: #fff; }
body:not(.sidebar-collapsed) .nav-section:not(.nav-section-collapsed) > .nav-section-toggle .nav-group-icon { background: linear-gradient(135deg, rgba(34, 211, 238, 0.35), rgba(37, 99, 235, 0.35)); color: #fff; }
.nav-section.menu-empty { display: none; }

/* itens */
body:not(.sidebar-collapsed) .nav-section-items { position: relative; gap: 1px; padding: 2px 0 8px 22px; }
body:not(.sidebar-collapsed) .nav-section-items::before { content: ""; position: absolute; left: 21px; top: 4px; bottom: 10px; width: 1px; background: rgba(148, 163, 184, 0.16); }
body:not(.sidebar-collapsed) .nav-item,
body:not(.sidebar-collapsed) .nav-link {
  min-height: 32px; border: 0; border-radius: 8px; padding: 6px 10px 6px 16px;
  font-size: 13px; font-weight: 550; color: #b6c2d6; box-shadow: none;
}
body:not(.sidebar-collapsed) .nav-item .nav-icon,
body:not(.sidebar-collapsed) .nav-link .nav-icon { display: none; }
body:not(.sidebar-collapsed) .nav-item:hover,
body:not(.sidebar-collapsed) .nav-link:hover { transform: none; background: rgba(255, 255, 255, 0.06); color: #fff; }
body:not(.sidebar-collapsed) .nav-active,
body:not(.sidebar-collapsed) .nav-active:hover {
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.2), rgba(37, 99, 235, 0.1)); color: #fff; font-weight: 650; box-shadow: none;
}
body:not(.sidebar-collapsed) .nav-active::before { content: ""; position: absolute; left: -1px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: #22d3ee; }

/* subtítulos dentro do grupo (ex.: Incorporação) */
.nav-subtitle { padding: 8px 0 3px 16px; color: #7c8aa5; font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.nav-subtitle:first-child { padding-top: 4px; }
.nav-subtitle.menu-empty, body.sidebar-collapsed .nav-subtitle, .menu-searching .nav-subtitle { display: none; }

/* resultado da busca */
.menu-searching .nav-section-items { display: grid !important; }
.menu-searching .menu-miss { display: none !important; }
.menu-searching .nav-section-toggle .nav-section-arrow { visibility: hidden; }

/* rodapé com o usuário */
.menu-user { display: none; align-items: center; gap: 10px; border-top: 1px solid rgba(148, 163, 184, 0.14); padding: 10px 6px 2px; color: #94a3b8; font-size: 12px; }
.menu-user.show { display: flex; }
.menu-user b { display: block; color: #e2e8f0; font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.menu-user i { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, #22d3ee, #2563eb); color: #fff; font-style: normal; font-weight: 800; font-size: 12px; }
body.sidebar-collapsed .menu-user span { display: none; }
body.sidebar-collapsed .menu-user { justify-content: center; padding-left: 0; padding-right: 0; }
