/**
 * Menu de Navegação - Estilos
 */

.main-menu {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 240px;
  background: linear-gradient(180deg, #0B3F36 0%, #0a3630 100%);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.menu-brand {
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-brand .brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: white;
  flex: 1;
  min-width: 0;
}

.btn-collapse {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-collapse:hover {
  background: rgba(255,255,255,0.2);
  color: white;
}

.btn-collapse svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s;
}

.menu-brand .brand-icon {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-brand .brand-icon svg {
  width: 22px;
  height: 22px;
}

.menu-brand .brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.menu-items {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
}

.menu-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.menu-item:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.menu-item.active {
  background: rgba(255,255,255,0.15);
  color: white;
}

.menu-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: #F2C94C;
  border-radius: 0 3px 3px 0;
}

.menu-user {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.user-name {
  display: block;
  color: white;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  display: block;
  color: rgba(255,255,255,0.5);
  font-size: 11px;
}

.btn-logout {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: rgba(255,255,255,0.2);
  color: white;
}

.btn-logout svg {
  width: 18px;
  height: 18px;
}

.btn-login {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: #F2C94C;
  color: #0B3F36;
  text-decoration: none;
  text-align: center;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-login:hover {
  background: #e5bc3f;
}

.menu-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0B3F36;
  border: none;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 1001;
  align-items: center;
  justify-content: center;
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* Page with menu */
.page-with-menu {
  margin-left: 240px;
  min-height: 100vh;
}

/* Collapsed State */
.main-menu {
  transition: width 0.3s ease;
}

.main-menu.collapsed {
  width: 72px;
}

.main-menu.collapsed .brand-name {
  display: none;
}

.main-menu.collapsed .btn-collapse svg {
  transform: rotate(180deg);
}

.main-menu.collapsed .menu-item span {
  display: none;
}

.main-menu.collapsed .menu-item {
  justify-content: center;
  padding: 12px;
}

.main-menu.collapsed .user-details {
  display: none;
}

.main-menu.collapsed .menu-user {
  justify-content: center;
}

.main-menu.collapsed .btn-logout {
  display: none;
}

.main-menu.collapsed .btn-login {
  padding: 10px;
  font-size: 0;
}

.main-menu.collapsed .btn-login::before {
  content: '>';
  font-size: 14px;
}

/* Page with collapsed menu */
.page-with-menu.menu-collapsed,
.main-layout.menu-collapsed {
  margin-left: 72px;
}

/* Responsive */
@media (max-width: 1024px) {
  .main-menu {
    transform: translateX(-100%);
  }

  .main-menu.open {
    transform: translateX(0);
  }

  .main-menu.collapsed {
    width: 240px;
  }

  .btn-collapse {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .page-with-menu,
  .page-with-menu.menu-collapsed,
  .main-layout,
  .main-layout.menu-collapsed {
    margin-left: 0;
  }
}
