/* ====================================== */
/* 🔐 PULSAR RBAC SYSTEM v18.0            */
/* ====================================== */

/* ====================================== */
/* ELEMENTOS BLOQUEADOS                   */
/* ====================================== */
.locked {
  position: relative;
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(100%);
}

.locked::after {
  content: '🔒';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  z-index: 10;
}

/* ====================================== */
/* ROLE BADGES                            */
/* ====================================== */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  animation: badge-glow 2s infinite;
}

@keyframes badge-glow {
  0%, 100% {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: 0 2px 20px rgba(255, 255, 255, 0.4);
  }
}

.role-badge.visitor {
  background: #6C757D;
  color: white;
}

.role-badge.user {
  background: linear-gradient(135deg, #00D9FF, #0099CC);
  color: white;
}

.role-badge.organizer {
  background: linear-gradient(135deg, #8B00FF, #6B00CC);
  color: white;
}

.role-badge.admin {
  background: linear-gradient(135deg, #FF0064, #CC0050);
  color: white;
}

/* ====================================== */
/* MODAL DE UPGRADE                       */
/* ====================================== */
.upgrade-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modal-fade-in 0.3s ease-out;
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.upgrade-modal-content {
  background: linear-gradient(135deg, #1a0030, #0a0015);
  border-radius: 30px;
  padding: 3rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(139, 0, 255, 0.4);
  border: 2px solid rgba(139, 0, 255, 0.3);
  animation: modal-scale-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modal-scale-in {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.upgrade-icon {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  animation: upgrade-icon-bounce 1s infinite;
}

@keyframes upgrade-icon-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.upgrade-modal-content h2 {
  font-size: 2rem;
  font-weight: bold;
  background: linear-gradient(45deg, #8B00FF, #FF0064);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

.upgrade-modal-content p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* ====================================== */
/* BENEFÍCIOS DO UPGRADE                  */
/* ====================================== */
.upgrade-benefits {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: left;
}

.upgrade-benefits h3 {
  font-size: 1.2rem;
  color: white;
  margin-bottom: 1rem;
  text-align: center;
}

.upgrade-benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.upgrade-benefits li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.upgrade-benefits li:last-child {
  border-bottom: none;
}

/* ====================================== */
/* AÇÕES DO MODAL                         */
/* ====================================== */
.upgrade-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-upgrade {
  background: linear-gradient(135deg, #8B00FF, #FF0064);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-upgrade:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(139, 0, 255, 0.5);
}

.btn-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* ====================================== */
/* INDICADORES DE PERMISSÃO               */
/* ====================================== */
.permission-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.3);
  border-radius: 20px;
  font-size: 0.85rem;
  color: #00D9FF;
  margin: 0.25rem;
}

.permission-indicator.granted {
  background: rgba(6, 255, 165, 0.1);
  border-color: rgba(6, 255, 165, 0.3);
  color: #06FFA5;
}

.permission-indicator.denied {
  background: rgba(255, 0, 100, 0.1);
  border-color: rgba(255, 0, 100, 0.3);
  color: #FF0064;
}

/* ====================================== */
/* TOOLTIPS DE RESTRIÇÃO                  */
/* ====================================== */
[data-requires-role] {
  position: relative;
}

[data-requires-role]:hover::after {
  content: attr(data-requires-role);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 0.5rem;
  pointer-events: none;
}

/* ====================================== */
/* DASHBOARD POR ROLE                     */
/* ====================================== */
.dashboard-container {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
  padding: 2rem;
  min-height: 100vh;
}

.dashboard-sidebar {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 20px;
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.dashboard-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  color: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.3s;
}

.dashboard-menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.dashboard-menu-item.active {
  background: linear-gradient(135deg, #8B00FF, #FF0064);
  color: white;
}

.dashboard-menu-item.locked {
  opacity: 0.3;
  cursor: not-allowed;
}

.dashboard-content {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 20px;
  padding: 2rem;
}

/* ====================================== */
/* NÍVEIS DE ACESSO VISUAL                */
/* ====================================== */
.access-level-indicator {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.access-level-dot {
  width: 40px;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  transition: all 0.3s;
}

.access-level-dot.active {
  background: linear-gradient(90deg, #8B00FF, #FF0064);
  box-shadow: 0 0 10px rgba(139, 0, 255, 0.5);
}

/* Role 0 - Visitante */
.user-role-0 .access-level-dot:nth-child(1) {
  background: #6C757D;
}

/* Role 1 - Usuário */
.user-role-1 .access-level-dot:nth-child(1),
.user-role-1 .access-level-dot:nth-child(2) {
  background: #00D9FF;
}

/* Role 2 - Organizador */
.user-role-2 .access-level-dot:nth-child(1),
.user-role-2 .access-level-dot:nth-child(2),
.user-role-2 .access-level-dot:nth-child(3) {
  background: #8B00FF;
}

/* Role 3 - Admin */
.user-role-3 .access-level-dot {
  background: #FF0064;
}

/* ====================================== */
/* RESPONSIVO                             */
/* ====================================== */
@media (max-width: 768px) {
  .upgrade-modal-content {
    padding: 2rem;
    max-width: 90%;
  }
  
  .upgrade-icon {
    font-size: 3.5rem;
  }
  
  .upgrade-modal-content h2 {
    font-size: 1.5rem;
  }
  
  .dashboard-container {
    grid-template-columns: 1fr;
  }
  
  .dashboard-sidebar {
    position: static;
  }
}
