/* Sidebar fixa estilo Corvex */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 260px;
  background: #050505;
  border-right: 1px solid rgba(161, 0, 255, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width 0.22s cubic-bezier(.4,0,.2,1);
  box-shadow: 8px 0 32px 0 #000c;
}
.sidebar.minimized {
  width: 72px;
}
  .sidebar__logo {
    height: 80px;
    padding: 0;
    border-bottom: 2px solid #1B1B22;
    background: #0D0D12;
    position: relative;
  }
  .sidebar-logo-img-full {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    position: static;
    margin: 0 auto;
  }
.sidebar__logo svg {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 0 8px #A100FF55);
}
.sidebar__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: 2.5rem;
  padding: 0 0.5rem;
}
.sidebar__nav-btn {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: transparent;
  border: 1px solid transparent;
  color: #EDEDED;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.82em 1em;
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.18s;
  position: relative;
  outline: none;
  letter-spacing: 0.01em;
  margin-bottom: 0.1em;
  box-shadow: none;
}
.sidebar__nav-btn:hover {
  border-color: rgba(161, 0, 255, 0.25);
  background: rgba(161, 0, 255, 0.06);
}
.sidebar__nav-btn.active,
.sidebar__nav-btn:focus-visible {
  border-color: rgba(161, 0, 255, 0.55);
  background: rgba(161, 0, 255, 0.10);
  color: #EDEDED;
  box-shadow: 0 0 0 1px rgba(161, 0, 255, 0.15);
}
.sidebar__nav-btn.active::before {
  display: none;
}
.sidebar__nav-btn svg,
.sidebar__nav-btn .lucide {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  transition: color 0.15s;
  color: var(--color-text-secondary);
}
.sidebar__nav-btn.active svg,
.sidebar__nav-btn.active .lucide {
  color: #EDEDED;
  filter: none;
}
.sidebar__footer {
  margin-bottom: 2.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}
.sidebar__footer .ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 90%;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 12px;
  background: transparent;
  color: #EDEDED;
  border: 1px solid rgba(161, 0, 255, 0.35);
  margin-bottom: 0.5rem;
  box-shadow: none;
}
.sidebar__footer .ghost .lucide {
  width: 20px;
  height: 20px;
}
.sidebar__footer .ghost:hover {
  background: rgba(161, 0, 255, 0.06);
  color: #EDEDED;
}
.sidebar__toggle {
  background: #181825;
  border: none;
  color: var(--color-text-secondary);
  margin: 0;
  cursor: pointer;
  font-size: 1.3em;
  border-radius: 10px;
  padding: 0.6em 0.7em;
  transition: background 0.15s, color 0.15s;
  box-shadow: 0 2px 16px 0 #A100FF11;
}
.sidebar__toggle:hover {
  background: #A100FF22;
  color: var(--color-brand);
}

/* Mobile/tablet: sidebar compacta vertical (evita sobreposição do conteúdo) */
@media (max-width: 900px) {
  .sidebar {
    width: 72px;
    height: 100vh;
    flex-direction: column;
    border-right: 1px solid rgba(161, 0, 255, 0.15);
    border-bottom: none;
    box-shadow: 8px 0 28px 0 #000c;
  }
  .sidebar.minimized {
    width: 72px;
  }
  .sidebar__logo {
    height: 72px;
    border-bottom: 1px solid #1B1B22;
    border-right: none;
  }
  .sidebar__nav {
    flex-direction: column;
    margin-top: 1rem;
    gap: 0.4rem;
    align-items: stretch;
    justify-content: flex-start;
    overflow: hidden;
    padding: 0 0.35rem;
  }
  .sidebar__nav-btn {
    padding: 0.62em;
    min-width: 0;
    width: 100%;
    justify-content: center;
    font-size: 0;
    border-radius: 10px;
    gap: 0;
    text-indent: -9999px;
    white-space: nowrap;
  }
  .sidebar__nav-btn svg,
  .sidebar__nav-btn .lucide {
    width: 20px;
    height: 20px;
    text-indent: 0;
  }
  .sidebar__footer {
    margin: 0 0.25rem 0.75rem;
    gap: 0.35rem;
    flex-direction: column;
    align-items: stretch;
  }
  .sidebar__footer .ghost {
    width: 100%;
    margin: 0;
    padding: 0.55rem 0.6rem;
    font-size: 0;
    justify-content: center;
  }
  .sidebar__footer .ghost .lucide {
    margin: 0;
  }
  .sidebar__toggle {
    padding: 0.5rem;
  }
}

/* Mobile Drawer Overrides (<=768) */
.mobile-topbar {
  display: none;
}

.sidebar-overlay {
  display: none;
}

@media (min-width: 769px) and (max-width: 900px) {
  .sidebar {
    width: 260px;
    transform: none;
  }

  .sidebar.minimized {
    width: 72px;
  }

  .sidebar__logo {
    height: 80px;
    border-bottom: 2px solid #1B1B22;
  }

  .sidebar__nav {
    flex-direction: column;
    margin-top: 2.5rem;
    gap: 1.1rem;
    padding: 0 0.5rem;
  }

  .sidebar__nav-btn {
    padding: 0.82em 1em;
    font-size: 1rem;
    gap: 1.1rem;
    text-indent: 0;
    white-space: normal;
  }

  .sidebar__footer .ghost {
    width: 90%;
    font-size: 0.95rem;
  }
}

@media (max-width: 768px) {
  .mobile-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(13, 13, 18, 0.92);
    border-bottom: 1px solid rgba(161, 0, 255, 0.2);
    backdrop-filter: blur(10px);
    z-index: 120;
  }

  .mobile-menu-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 13, 18, 0.7) !important;
    border: 1px solid rgba(161, 0, 255, 0.35) !important;
    border-radius: 10px;
    color: #ededed !important;
    box-shadow: none !important;
  }

  .mobile-topbar__logo {
    height: 28px;
    width: auto;
    object-fit: contain;
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    z-index: 105;
  }

  .sidebar-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    width: 272px;
    max-width: 86vw;
    transform: translateX(-100%);
    transition: transform 0.24s ease, width 0.22s cubic-bezier(.4,0,.2,1);
    z-index: 110;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar.minimized {
    width: 272px;
  }

  .sidebar__toggle {
    display: none;
  }
}
