﻿/* ===== SIDEBAR ADMIN - Estilo Oceanstock ===== */

/* DESKTOP */
.desktopSidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 280px;
  background-color: #111113;
  display: flex;
  flex-direction: column;
  z-index: 999;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  transition: width 0.2s ease;
}

.desktopSidebar.open {
  width: 280px;
}

.desktopSidebar.closed {
  width: 70px;
}

/* Logo / Header */
.sidebarHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.appBrand {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  text-decoration: none;
}

.brandLogo {
  height: 28px;
  width: auto;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.closed .brandLogo {
  height: 24px;
}

.toggleBtn {
  border: none;
  background: transparent;
  color: #9ca3af;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.toggleBtn:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #e5e7eb;
}

.toggleBtn ion-icon {
  font-size: 16px;
}

/* Navegacion */
.navigation {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.navigation::-webkit-scrollbar {
  width: 4px;
}

.navigation::-webkit-scrollbar-track {
  background: transparent;
}

.navigation::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.navMenu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.navItem {
  margin: 2px 0;
}

.navLink {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #9ca3af;
  font-size: 14px;
  font-weight: 400;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.navLink:hover {
  color: #e5e7eb;
  background-color: rgba(255, 255, 255, 0.04);
}

.navLink.active {
  color: #5b9aff;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  font-weight: 500;
}

.linkIcon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  font-size: 18px;
  transition: color 0.15s ease;
}

.navLink:hover .linkIcon {
  color: #e5e7eb;
}

.navLink.active .linkIcon {
  color: #5b9aff;
}

.closed .linkIcon {
  margin: 0 auto;
}

.linkText {
  font-weight: inherit;
  white-space: nowrap;
  flex: 1;
  transition: opacity 0.2s ease;
}

.closed .linkText {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

/* Footer / Logout */
.sidebarFooter {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: auto;
}

.logoutButton {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.15s ease;
}

.logoutButton:hover {
  background-color: rgba(239, 68, 68, 0.08);
  color: #ef4444;
}

.logoutButton ion-icon {
  font-size: 18px;
}

.logoutButton span {
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.closed .logoutButton span {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.closed .logoutButton {
  justify-content: center;
}

/* ===== MOVIL ===== */

.mobileTopBar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 56px;
  background-color: #111113;
  display: flex;
  align-items: center;
  padding: 0 16px;
  z-index: 990;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hamburgerButton {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #f9fafb;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.hamburgerButton:hover,
.hamburgerButton:active {
  background-color: rgba(255, 255, 255, 0.06);
}

.mobileAppBrand {
  display: flex;
  align-items: center;
  margin-left: 8px;
  gap: 8px;
}

.mobileBrandLogo {
  height: 24px;
  width: auto;
  object-fit: contain;
}

.mobileOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 995;
  backdrop-filter: blur(4px);
}

.mobileSidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 288px;
  background-color: #111113;
  display: flex;
  flex-direction: column;
  z-index: 996;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  overflow-y: auto;
}

.mobileSidebar.mobileOpen {
  transform: translateX(0);
}

.mobileSidebarHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.mobileHeaderBrand {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.mobileCloseButton {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mobileCloseButton:hover,
.mobileCloseButton:active {
  background-color: rgba(255, 255, 255, 0.06);
  color: #e5e7eb;
}

.mobileUserCard {
  display: flex;
  align-items: center;
  padding: 16px;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobileUserAvatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 20px;
}

.mobileUserInfo {
  overflow: hidden;
}

.mobileUserName {
  font-size: 14px;
  color: #f9fafb;
  margin: 0 0 2px;
  font-weight: 600;
}

.mobileUserEmail {
  font-size: 12px;
  color: #6b7280;
  margin: 0;
}

.mobileNavigation {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.mobileNavMenu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobileNavItem {
  margin: 2px 0;
}

.mobileNavLink {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #9ca3af;
  font-size: 14px;
  font-weight: 400;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.mobileNavLink:hover,
.mobileNavLink:active {
  color: #e5e7eb;
  background-color: rgba(255, 255, 255, 0.04);
}

.mobileNavLink.mobileActive {
  color: #5b9aff;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  font-weight: 500;
}

.mobileLinkIcon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  font-size: 18px;
  transition: color 0.15s ease;
}

.mobileNavLink:hover .mobileLinkIcon,
.mobileNavLink:active .mobileLinkIcon {
  color: #e5e7eb;
}

.mobileNavLink.mobileActive .mobileLinkIcon {
  color: #5b9aff;
}

.mobileLinkText {
  font-weight: inherit;
  white-space: nowrap;
  flex: 1;
  font-size: 14px;
}

.mobileSidebarFooter {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: auto;
}

.mobileLogoutButton {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mobileLogoutButton:hover,
.mobileLogoutButton:active {
  background-color: rgba(239, 68, 68, 0.08);
  color: #ef4444;
}

.mobileLogoutButton ion-icon {
  font-size: 18px;
}

/* ===== MEDIA QUERIES ===== */

@media (min-width: 769px) {
  .mobileTopBar,
  .mobileSidebar,
  .mobileOverlay {
    display: none;
  }
}

@media (max-width: 768px) {
  .desktopSidebar {
    display: none;
  }
}

@media (max-width: 480px) {
  .mobileSidebar {
    width: 85%;
  }
}

@media (max-width: 320px) {
  .mobileSidebar {
    width: 95%;
  }
}
