/* ============================================
   ELEVA AMAPÁ — Dashboard
   Sidebar + header + cards, paleta preto/dourado.
   ============================================ */

html { scroll-behavior: smooth; }

body {
  background: #09090b;
  background-image: radial-gradient(circle at 90% 0%, rgba(245, 158, 11, 0.06), transparent 40%);
}

/* Sidebar */
.sidebar {
  background: #0c0c0e;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.nav-link {
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}
.nav-link:hover {
  background: rgba(255,255,255,0.03);
}
.nav-link.active {
  background: rgba(245, 158, 11, 0.08);
  border-left-color: #f59e0b;
  color: #f59e0b !important;
}

/* Cards de acesso rápido */
.quick-card {
  background: #18181b;
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
@media (hover: hover) {
  .quick-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.35);
  }
}

.quick-card.locked {
  opacity: 0.75;
}

/* Badge de status do conteúdo */
.badge-free {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.badge-locked {
  background: rgba(113, 113, 122, 0.15);
  color: #a1a1aa;
  border: 1px solid rgba(113, 113, 122, 0.25);
}

/* Botão de acesso bloqueado (plano Free em Concursos) */
.btn-bloqueado {
  display: block;
  text-align: center;
  width: 100%;
  padding: 0.625rem 1rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.875rem;
  background: rgba(113, 113, 122, 0.15);
  color: #a1a1aa;
  border: 1px solid rgba(113, 113, 122, 0.3);
  cursor: not-allowed;
}

/* Card de progresso */
.progress-card {
  background: #18181b;
  border: 1px solid rgba(255,255,255,0.08);
}

/* Barra de progresso simples */
.progress-bar-track {
  width: 100%;
  height: 0.625rem;
  border-radius: 9999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  transition: width 0.4s ease;
}

/* Círculos de frequência semanal */
.day-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.day-circle .dot {
  position: relative;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
}

/* Selo de "dia de redação" sobreposto ao círculo principal.
   Exclusivo do Plano Estudante (só quem pode enviar redação
   tem esse selo renderizado). */
.redacao-flag {
  position: absolute;
  bottom: -0.3rem;
  right: -0.3rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  background: #27272a;
  border: 1.5px solid #09090b;
  opacity: 0.45;
}
.redacao-flag.enviada {
  background: rgba(139, 92, 246, 0.25);
  border-color: #a78bfa;
  opacity: 1;
}
.day-circle .label {
  font-size: 0.65rem;
  color: #71717a;
  font-weight: 700;
  text-transform: uppercase;
}
.day-off .dot { background: #27272a; color: #52525b; }
.day-pending .dot { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.4); }
.day-estudado .dot { background: #10b981; color: #052e21; }
.day-faltou .dot { background: #ef4444; color: #2c0b0b; }

.legend-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  display: inline-block;
}

/* Checkbox visual de "dia da semana" no modal */
.dia-checkbox {
  cursor: pointer;
}
.dia-checkbox span {
  display: block;
  text-align: center;
  padding: 0.5rem 0;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: #18181b;
  border: 1px solid rgba(255,255,255,0.1);
  color: #a1a1aa;
  transition: all 0.15s ease;
}
.dia-checkbox input:checked + span {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  color: #fbbf24;
}

/* Modal de configuração de meta */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-box {
  background: #0c0c0e;
  border: 1px solid rgba(255,255,255,0.08);
  max-height: 90vh;
  overflow-y: auto;
}

/* Card de upgrade, destaque dourado */
.upgrade-card {
  background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(245,158,11,0.03));
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* Banner de aviso de vencimento da assinatura */
.banner-vencendo {
  background: linear-gradient(135deg, rgba(245,158,11,0.14), rgba(245,158,11,0.04));
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.banner-vencido {
  background: linear-gradient(135deg, rgba(239,68,68,0.14), rgba(239,68,68,0.04));
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.banner-vencido #banner-assinatura-btn,
.banner-vencido .banner-btn-urgente {
  background: #ef4444;
  color: #fff;
}
.banner-vencido #banner-assinatura-btn:hover {
  background: #dc2626;
}

/* Fade-in suave ao carregar */
.fade-in {
  animation: fadeIn 0.5s ease-out both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Overlay de carregamento enquanto verifica sessão */
#auth-checking {
  position: fixed;
  inset: 0;
  background: #09090b;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.loading-spinner {
  width: 2.25rem;
  height: 2.25rem;
  border: 3px solid rgba(245,158,11,0.2);
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Menu mobile da sidebar */
#sidebar {
  transition: transform 0.3s ease;
}
@media (max-width: 1023px) {
  #sidebar {
    transform: translateX(-100%);
  }
  #sidebar.open {
    transform: translateX(0);
  }
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #09090b; }
::-webkit-scrollbar-thumb { background: #27272a; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #3f3f46; }