/* ============================================================
   EVOLUE EMPRESARIAL — Design System
   Cores: Preto · Branco · Azul Marinho · Dourado
   ============================================================ */

:root {
  --black:       #0a0a0a;
  --dark:        #111111;
  --dark-card:   #1a1a1a;
  --dark-input:  #222222;
  --navy:        #1B3A6B;
  --navy-light:  #2a5298;
  --gold:        #C9A84C;
  --gold-light:  #E2C074;
  --gold-dark:   #A07830;
  --white:       #FFFFFF;
  --gray:        #888888;
  --gray-light:  #B0B0B0;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 9999px; }

/* Scroll horizontal sem barra */
.scroll-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scrollbar-width: none;
}
.scroll-row::-webkit-scrollbar { display: none; }

/* ── Card de módulo ── */
.module-card {
  flex-shrink: 0;
  width: 220px;
  background: var(--dark-card);
  border-radius: 0.75rem;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(201,168,76,0.15);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.module-card:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 50px rgba(0,0,0,0.7), 0 0 0 1px rgba(201,168,76,0.4);
  border-color: rgba(201,168,76,0.5);
}
.module-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  transition: transform 0.4s;
}
.module-card:hover img { transform: scale(1.08); }

/* ── Barra de progresso ── */
.progress-bar {
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 9999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
  border-radius: 9999px;
  transition: width 0.6s ease;
}

/* ── Item de aula ── */
.lesson-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s;
}
.lesson-item:hover  { background: rgba(255,255,255,0.05); }
.lesson-item.active {
  background: rgba(27,58,107,0.3);
  border: 1px solid rgba(201,168,76,0.3);
}
.lesson-item.locked { opacity: 0.4; cursor: not-allowed; }

/* ── Badge da aula ── */
.lesson-badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255,255,255,0.08);
  color: var(--gray-light);
  border: 1px solid rgba(255,255,255,0.1);
}
.lesson-badge.done   { background: var(--navy); border-color: var(--gold-dark); color: var(--gold); }
.lesson-badge.active { background: var(--gold); border-color: var(--gold); color: var(--black); }

/* ── Inputs ── */
.input-dark {
  width: 100%;
  background: var(--dark-input);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-size: 0.9rem;
}
.input-dark:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}
.input-dark::placeholder { color: #555; }
select.input-dark option { background: var(--dark-input); }

/* ── Botões ── */
.btn-primary {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--black);
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201,168,76,0.3);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Alias usado nos HTMLs */
.btn-red { background: linear-gradient(135deg, var(--gold-dark), var(--gold)); color: var(--black); font-weight: 700; padding: 0.75rem 1.5rem; border-radius: 0.5rem; border: none; cursor: pointer; transition: opacity 0.2s; font-size: 0.9rem; }
.btn-red:hover { opacity: 0.88; }
.btn-red:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  background: rgba(255,255,255,0.07);
  color: var(--white);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.9rem;
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); }

/* ── Navbar ── */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.navbar-brand img {
  height: 36px;
  width: auto;
  object-fit: contain;
}
.navbar-brand-text {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--white) 40%, var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Separador decorativo dourado ── */
.gold-bar {
  display: inline-block;
  width: 4px;
  height: 1.4em;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
  border-radius: 9999px;
  vertical-align: middle;
  margin-right: 0.5rem;
}

/* ── Erros de formulário ── */
.form-error {
  background: rgba(180,30,30,0.15);
  border: 1px solid rgba(180,30,30,0.4);
  color: #fca5a5;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
}

/* ── Animações ── */
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
.fade-in  { animation: fadeIn  0.35s ease; }
.slide-up { animation: slideUp 0.4s ease; }

/* ── Hero ── */
.hero-overlay {
  background: linear-gradient(to top, var(--dark) 20%, rgba(10,10,10,0.5) 60%, transparent);
}

/* ── Hero do dashboard — capa premium compacta (Fase 6 / ajuste fino) ── */
.dashboard-hero {
  position: relative;
  height: 230px;          /* desktop */
  margin-top: 64px;       /* compensa a navbar fixa */
}
.dashboard-hero-bg {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: auto 130%;          /* montanha maior, ainda sem cortar o topo */
  background-position: 92% center;     /* montanha à direita, levemente para dentro da tela */
  background-color: #00040D;           /* área vazia da esquerda = mesma cor da imagem (sem emenda) */
}
@media (max-width: 640px) {
  .dashboard-hero { height: 210px; }   /* mobile — altura mantida */
}

/* ── Player ── */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 0.75rem;
  background: #000;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 0 1px rgba(201,168,76,0.2);
}
.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ── Divisor dourado ── */
.divider-gold {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 2rem 0;
  opacity: 0.3;
}

/* ── Auth Gate — tela de carregamento até a validação de acesso concluir ── */
#auth-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--black);
  text-align: center;
}
body.auth-checking #auth-gate { display: flex; }
body.auth-checking { overflow: hidden; }
.auth-gate-logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, var(--white) 40%, var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}
.auth-gate-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid rgba(201,168,76,0.2);
  border-top-color: var(--gold);
  border-radius: 9999px;
  animation: authspin 0.8s linear infinite;
}
.auth-gate-text {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--gray);
  letter-spacing: 0.04em;
}
@keyframes authspin { to { transform: rotate(360deg); } }

/* ============================================================
   FASE 6 — Polimento da área do aluno (utilitários visuais)
   Apenas estilo. Nenhuma lógica/segurança depende daqui.
   ============================================================ */

/* ── Elevação suave no hover (cards) ── */
.hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(0,0,0,0.6);
  border-color: rgba(201,168,76,0.4) !important;
}

/* ── Capa de fallback elegante (sem imagem) ── */
.cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(130% 130% at 0% 0%, rgba(201,168,76,0.30), transparent 55%),
    linear-gradient(135deg, var(--navy), #0c1830);
}
.cover-fallback span {
  font-size: 2.4rem;
  font-weight: 800;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 2px 12px rgba(0,0,0,0.45);
  letter-spacing: 0.02em;
}

/* ── Área de capa do card de produto (dashboard) ── */
.product-card-cover {
  position: relative;
  overflow: hidden;
  height: 230px;          /* desktop */
}
@media (max-width: 640px) {
  .product-card-cover { height: 195px; }  /* mobile */
}

/* ── Área de capa do card de módulo (página do produto) ── */
.module-card-cover {
  position: relative;
  overflow: hidden;
  height: 200px;          /* desktop */
}
@media (max-width: 640px) {
  .module-card-cover { height: 180px; }  /* mobile */
}

/* ── CTA dentro do card (Continuar / Começar / Acessar) ── */
.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--gold);
}
.card-cta svg { width: 14px; height: 14px; }

/* ── Estado vazio premium ── */
.empty-state {
  text-align: center;
  max-width: 440px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}
.empty-state-icon {
  width: 76px;
  height: 76px;
  border-radius: 9999px;
  margin: 0 auto 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  background: rgba(27,58,107,0.28);
  border: 1px solid rgba(201,168,76,0.28);
}
.empty-state h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.6rem; }
.empty-state p  { color: var(--gray); font-size: 0.92rem; line-height: 1.6; }

/* ── Pílula de status (Ativo / Inativo / Bloqueado / Expirado) ── */
.status-pill {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.status-pill.ok  { background: rgba(201,168,76,0.12);  color: var(--gold); border: 1px solid rgba(201,168,76,0.35); }
.status-pill.off { background: rgba(229,115,115,0.10); color: #e57373;     border: 1px solid rgba(229,115,115,0.30); }

/* ── Rótulo de status da aula (módulo) ── */
.lesson-status {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
  white-space: nowrap;
}
.lesson-status.done   { color: var(--gold); }
.lesson-status.todo   { color: #6b6b6b; }
.lesson-status.locked { color: #5a5a5a; }

/* ── Chips de estatística (produto) ── */
.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--gray-light);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
}
.stat-chip b { color: #fff; font-weight: 700; }

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: #666;
  flex-wrap: wrap;
}
.breadcrumb a { color: #888; text-decoration: none; transition: color 0.15s; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .current { color: var(--gold); font-weight: 600; }

/* ── Ajustes mobile (prioridade: celular) ── */
@media (max-width: 640px) {
  .navbar-brand-text { font-size: 0.95rem; }
  .navbar-brand img  { height: 30px; }
  .empty-state { padding: 3rem 1rem; }
  .btn-block-mobile { width: 100%; justify-content: center; }
  .video-wrapper { border-radius: 0.5rem; }
}

/* ── Tabs do admin ── */
.tab-btn {
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  color: var(--gray);
  cursor: pointer;
  transition: all 0.2s;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
}
.tab-btn.active { border-bottom-color: var(--gold); color: var(--white); }
.tab-btn:hover:not(.active) { color: var(--gray-light); }
