:root {
  --primary-color: #00ff99; /* Cor dos ícones */
  --primary-dark: #5a67d8; /* Scrollbar hover */
  --success-color: #48bb78; /* Status ativo */
  --danger-color: #f56565; /* Status inativo e alertas */

  --bg-primary: #d4d5d6; /* Fundo geral */
  --bg-secondary: #393a41; /* Fundo divisórias */
  --bg-primary-dark: #131316;
  --bg-secondary-dark: #1c1c21;
  --bg-third-dark: #26262c;
  --bg-card: #2f3037; /* Cor de fundo dos cards */
  --bg-overlay: rgba(45, 55, 72, 0.6); /* Fundo overlay modal */

  --text-primary: #fff; /* Texto padrão */
  --text-secondary: #adb7c7; /* Texto secundário */
  --text-muted: #adb7c7; /* Texto desativado */

  --border-color: #48bb78; /* Bordas */

  --button-save: #379960; /* Botão principal */
  --button-secondary: #5a67d8; /* Botões secundários */
  --gradient-danger: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 20px;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(102, 126, 234, 0.1) 0%, transparent 25%),
    radial-gradient(circle at 75% 75%, rgba(75, 162, 97, 0.1) 0%, transparent 25%);
}

/* Header */
header {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

#logout {
  background: var(--gradient-danger);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

#logout:hover {
  transform: translateY(-2px);

}

#logout i {
  font-size: 16px;
}

/* Layout principal do Home */
.main-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  width: 100%;
  max-width: 1000px;
  box-sizing: border-box;
  margin: 0 auto;
}

/* Cards principais */
.welcome-card,
.plan-card,
.navigation-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: 0 0 8px 2px #667eea;
  padding: 30px;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  border: 2px solid #667eea;
  animation: pulseShadow 1.5s infinite ease-in-out;
}

.welcome-card:hover,
.plan-card:hover,
.navigation-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 12px 6px #667eea;
}

/* Cabeçalhos dentro dos cards */
.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg-secondary);
}

.card-header i {
  font-size: 24px;
  background: var(--button-save);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-card h1,
.plan-card h2,
.navigation-card h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

/* Mensagem de boas-vindas */
.welcome-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* Cabeçalhos dentro dos cards */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between; /* joga o botão upgrade pra direita */
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg-secondary);
}

.card-header i {
  font-size: 24px;
  background: var(--button-save);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-card h1,
.plan-card h2,
.navigation-card h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  flex: 1; /* ocupa espaço no meio para separar do botão upgrade */
}

/* Botão de upgrade */
.btn-upgrade {
  background: var(--button-secondary);
  color: #fff;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-upgrade i {
  font-size: 18px;
  transition: var(--transition);
  background-color: #fff;
}

.btn-upgrade:hover {
  background: var(--primary-color);
  color: #131316;
  transform: translateY(-2px);
}

.btn-upgrade:hover i {
  background-color: #131316;
}

/* Lista de informações do plano */
.plan-info {
  list-style: none;
  padding: 0;
  margin: 0;
}

.plan-info li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.plan-info li i {
  color: var(--primary-color);
  font-size: 14px;
}

button {
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  outline: none;
}

button:hover {
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Botão de navegação */
.navigation-card button {
  margin-top: 16px;
  width: 100%;
  justify-content: center;
  background: var(--button-save);
  color: white;
  flex: 1;
  border-radius: 10px;
}


/* ===== POPUP OVERLAY ===== */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(4px);
  transition: var(--transition);
}

.popup-content {
  background: var(--bg-card);
  padding: 30px;
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 90%;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
  position: relative;
  animation: fadeIn 0.3s ease;
  border: 2px solid #667eea;
}

/* ===== Botão Fechar ===== */
.popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.popup-close:hover {
  color: var(--danger-color);
}

/* ===== Abas do Popup ===== */
.popup-tabs {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--bg-secondary);
}

.tab-button {
  flex: 1;
  padding: 10px 0;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
}

.tab-button i {
  margin-right: 6px;
}

.tab-button:hover {
  color: var(--primary-color);
}

.tab-button.active {
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
}

/* ===== Painel das Abas ===== */
.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: block;
}

/* ===== Lista de Planos ===== */
.plans-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.plan-option {
  background: var(--bg-secondary-dark);
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-secondary);
  transition: var(--transition);
}

.plan-option:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
  box-shadow: 0 0 10px var(--primary-color);
}

.plan-option h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--primary-color);
}

.plan-option p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

/* ===== Lista de Pacotes ===== */
.pack-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.pack-option {
  background: var(--bg-secondary-dark);
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-secondary);
  transition: var(--transition);
}

.pack-option:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
  box-shadow: 0 0 10px var(--primary-color);
}

.pack-option h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--primary-color);
}

.pack-option p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

/* ===== Botões ===== */
.btn-select-plan,
.btn-select-pack {
  background: var(--button-save);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  text-align: center;
}

.btn-select-plan:hover,
.btn-select-pack:hover {
  background: var(--primary-color);
  color: #131316;
}


.plans-list,
.pack-list {
  max-height: 300px; /* altura máxima antes de aparecer scroll */
  overflow-y: auto;  /* scroll vertical automático */
  padding-right: 8px; /* espaço para o scroll não sobrepor conteúdo */
}

/* Estilizando a barra de scroll (opcional) */
.plans-list::-webkit-scrollbar,
.pack-list::-webkit-scrollbar {
  width: 6px;
}

.plans-list::-webkit-scrollbar-thumb,
.pack-list::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 3px;
}

.plans-list::-webkit-scrollbar-track,
.pack-list::-webkit-scrollbar-track {
  background: transparent;
}

/* ===== Responsividade do Popup ===== */
@media (max-width: 600px) {
  .popup-content {
    width: 95%;
    height: 90%;
    max-width: none;
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
  }

  .plans-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px; /* evitar cortar scrollbar */
  }

  .plan-option {
    padding: 16px;
  }

  .btn-select-plan {
    font-size: 15px;
    padding: 12px;
  }

  .popup-close {
    top: 8px;
    right: 8px;
    font-size: 24px;
  }
}


/* Animação */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animação de glow azul */
@keyframes pulseShadow {
  0% {
    box-shadow: 0 0 15px #667eea;
  }
  50% {
    box-shadow: 0 0 25px #667eea;
  }
  100% {
    box-shadow: 0 0 15px #667eea;
  }
}

.hidden {
  display: none !important;
}



/* Scroll personalizado */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-dark);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}