/* SIDEBAR */
.sidebar {
  width: 300px;
  background: #0a1e38;
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  flex-shrink: 0;
  height: 100vh;
  border-right: 0.5px solid rgba(255, 255, 255, 0.171);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
}

.sidebar-spacer {
  width: 300px;
  flex-shrink: 0;
}

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

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 28px;
}

.logo-img {
  width: 35px;
}

.logo-text {
  font-size: 20px;
  font-weight: 600;
  color: white;
  line-height: 1.3;
}

.logo-text span {
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
  display: block;
  font-size: 14px;
}

.sidebar-section {
  padding: 0 12px 8px;
}

.sidebar-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.3);
  padding: 0 10px 8px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
}

.nav-item.active {
  background: rgba(62, 166, 216, 0.18);
  color: #6fcbee;
}

.nav-item.active i {
  color: #3ea6d8;
}

.nav-item i {
  font-size: 20px;
  width: 20px;
  text-align: center;
  font-weight: 100 !important;
}

.sidebar-divider {
  height: 0.5px;
  background: rgba(255, 255, 255, 0.07);
  margin: 12px 16px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 0 12px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.user-profile:hover {
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.048);
  margin-top: auto;
  padding: 15px 0 0 0;
  position: relative;
  display: flex;
  justify-content: center;
  gap: 5px;
  align-items: center;

  & p {
    color: rgb(194, 194, 194);
    font-size: 11px;
    font-weight: 500
  }

  & img {
    width: 30px;
  }
}

.sidebar-profile-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: -100%;
  width: 150px;
  background: #fbfdff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.418);
  overflow: hidden;
  z-index: 20;
}

.sidebar-profile-menu.active {
  display: block;
}

.sidebar-profile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-profile-menu-item:hover {
  background: rgba(235, 235, 235, 0.75);
  color: #ffffff;
}

.sidebar-profile-menu-item i {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

.user-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3ea6d8, #1a6fa0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
}


/* MOBILE TOPBAR */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #0a1e38;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
}

.mobile-topbar .sidebar-logo {
  padding: 0;
  margin: 0;
}

.mobile-menu-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.mobile-menu-btn i {
  font-size: 24px;
}

/* OVERLAY */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 150;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .mobile-topbar {
    display: flex;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
  }

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

  /* Empujá el contenido principal para no quedar tapado por la topbar */
  body>main,
  .main-content,
  .content,
  [class*="content"] {
    padding-top: 56px;
  }
}