:root{
  /* Paleta alinhada à logo Alfa Quântica */
  --primary: #3f87d8;
  --primary-dark: #2f6fb8;
  --dark: #1f1f1f;
  --gray: #6b6b6b;
  --border: #e5e5e5;
  --bg: #f4f4f4;
}

*{
  box-sizing: border-box;
}

html, body{
  height: 100%;
}

body{
  margin:0;
  font-family: Arial, Helvetica, sans-serif;
  background:#fff;
  color:#222;

  /* Mantém o rodapé no fundo */
  display: flex;
  flex-direction: column;
}

.container{
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
}

/* =====================
   TOPO
===================== */
.top{
  background:#fff;
  border-bottom: 1px solid #ddd;
}

.top__inner{
  padding: 18px 0;
  display:flex;
  align-items:center;
  justify-content:center;
}

.logo{
  height: 60px;
  width:auto;
  object-fit: contain;
}

/* =====================
   BARRA PRETA
===================== */
.bar{
  background: var(--dark);
  color:#fff;
  border-top: 1px solid #111;
  border-bottom: 1px solid #111;
}

.bar__inner{
  padding: 18px 0 10px 0;
  position: relative;
}

.bar h1{
  margin:0;
  font-size: 34px;
  font-weight: 300;
  padding-left: 6px;
}

.bar__accent{
  position:absolute;
  left: 6px;
  bottom: 0;
  width: 120px;
  height: 5px;
  background: var(--primary);
}

/* =====================
   CONTEÚDO
===================== */
.content{
  background: var(--bg);
  padding: 40px 0 60px 0;
  flex: 1;
}

/* =====================
   CARD
===================== */
.card{
  background:#fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 26px 26px 30px 26px;
  position: relative;
}

.card__topline{
  position:absolute;
  top:0;
  left:0;
  height:4px;
  width:100%;
  background: var(--primary);
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

/* Título do card */
.card h2{
  margin: 8px 0 22px 0;
  color: var(--primary);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .4px;
  border: none;
  padding: 0;
}

/* Garante que não exista pseudo-barra */
.card h2::before,
.card h2::after{
  display: none !important;
  content: none !important;
}

/* =====================
   ALERTA (OPÇÃO 2)
===================== */
.alert{
  border: 1px solid rgba(220, 53, 69, .35);
  background: rgba(220, 53, 69, .10);
  color: #842029;
  padding: 10px 12px;
  border-radius: 4px;
  margin: 6px 0 12px 0;
  font-size: 13px;
}

/* Se estiver vazio, NÃO aparece */
.alert:empty{
  display: none !important;
}

/* =====================
   FORMULÁRIO
===================== */
.form{
  display:flex;
  flex-direction: column;
  gap: 10px;
}

label{
  font-size: 13px;
  color: #333;
  margin-top: 6px;
}

input{
  height: 34px;
  padding: 0 10px;
  border: 1px solid #cfcfcf;
  border-radius: 2px;
  outline: none;
  background:#fff;
}

input:focus{
  border-color: #bdbdbd;
  box-shadow: 0 0 0 2px rgba(63,135,216,.14);
}

/* Remove autofill azul do navegador */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus{
  -webkit-text-fill-color: #222 !important;
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
  transition: background-color 999999s ease-in-out 0s;
}

/* reCAPTCHA */
.recaptcha{
  margin-top: 10px;
}

/* =====================
   BOTÃO
===================== */
.btn{
  margin-top: 14px;
  width: 140px;
  height: 42px;
  border: none;
  border-radius: 4px;
  background: var(--primary);
  color:#fff;
  font-size: 16px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}

.btn:hover{
  background: var(--primary-dark);
}

.btn:active{
  transform: translateY(1px);
}

/* =====================
   TEXTO AUXILIAR
===================== */
.muted{
  color: var(--gray);
}

/* =====================
   RODAPÉ
===================== */
.footer{
  background: var(--bg);
  padding: 16px 0 26px 0;
  color:#777;
  text-align:center;
  border-top: 1px solid #e9e9e9;
}

/* =====================
   RESPONSIVO
===================== */
@media (max-width: 520px){
  .bar h1{
    font-size: 28px;
  }
  .btn{
    width: 100%;
  }
}

/* =========================
   reCAPTCHA - ajuste mobile
   ========================= */
.recaptcha{
  margin-top: 10px;
  display: flex;
  justify-content: center; /* centraliza no card */
}

/* O widget vem dentro desse elemento */
.recaptcha .g-recaptcha{
  transform-origin: 0 0; /* garante escala previsível */
}

/* Telas bem estreitas: reduz levemente para caber perfeito */
@media (max-width: 360px){
  .recaptcha{
    justify-content: flex-start; /* evita “sobrar” espaço visual */
  }
  .recaptcha .g-recaptcha{
    transform: scale(0.92);
  }
}

@media (max-width: 320px){
  .recaptcha .g-recaptcha{
    transform: scale(0.86);
  }
}

.top__inner--nav{
  justify-content: space-between;
  gap: 16px;
}

.nav{
  display:flex;
  gap: 14px;
  align-items:center;
  flex-wrap: wrap;
  justify-content:flex-end;
}

.nav__link{
  text-decoration:none;
  color: #2b2b2b;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
}

.nav__link:hover{
  border-color: rgba(63,135,216,.25);
  background: rgba(63,135,216,.08);
}

.nav__link--out{
  border-color: rgba(220,53,69,.25);
}
.nav__link--out:hover{
  background: rgba(220,53,69,.08);
  border-color: rgba(220,53,69,.25);
}

@media (max-width: 520px){
  .top__inner--nav{
    justify-content:center;
    flex-direction: column;
  }
}

.top-right{
  display:flex;
  align-items:center;
  gap: 10px;
}

.user-menu{ position: relative; }

.user-btn{
  display:flex;
  align-items:center;
  gap:10px;
  background: transparent;
  border: 1px solid rgba(0,0,0,.10);
  padding: 6px 10px;
  border-radius: 999px;
  cursor:pointer;
}

.user-btn:hover{
  background: rgba(63,135,216,.06);
  border-color: rgba(63,135,216,.25);
}

.user-name{
  font-size: 13px;
  color:#222;
  max-width: 220px;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar{
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(63,135,216,.18);
  border: 1px solid rgba(63,135,216,.35);
  color: #1f5fa8;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 700;
  font-size: 14px;
}

.dropdown{
  position:absolute;
  right:0;
  top: calc(100% + 8px);
  width: 220px;
  background:#fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 8px;
  display:none;
  z-index: 999;
}

.dropdown--open{ display:block; }

.dropdown__item{
  display:block;
  padding: 10px 10px;
  border-radius: 10px;
  text-decoration:none;
  color:#222;
  font-size: 13px;
}

.dropdown__item:hover{
  background: rgba(63,135,216,.08);
}

.dropdown__sep{
  height: 1px;
  background: rgba(0,0,0,.08);
  margin: 6px 0;
}

.dropdown__item--danger{
  color:#842029;
}

.dropdown__item--danger:hover{
  background: rgba(220,53,69,.10);
}

@media (max-width: 720px){
  .user-name{ display:none; } /* estilo Google: só bolinha em telas menores */
}

/* ===== Barra preta com menu à direita ===== */
.bar__inner--with-menu{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.bar-left{
  min-width: 220px;
}

.bar-right{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

/* links dentro da barra preta */
.barlink{
  color:#fff;
  text-decoration:none;
  font-size:13px;
  padding:8px 10px;
  border-radius:8px;
  border:1px solid transparent;
}

.barlink:hover{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.18);
}

/* botões “Download” e “EAD” */
.barbtn{
  color:#fff;
  text-decoration:none;
  font-size:13px;
  padding:8px 12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.20);
  background: rgba(255,255,255,.06);
}

.barbtn:hover{
  background: rgba(255,255,255,.12);
}

/* Variante do user-btn para fundo escuro */
.user-btn--dark{
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
}
.user-btn--dark:hover{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.28);
}
.user-name--dark{ color:#fff; }

.avatar--dark{
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.28);
  color:#fff;
}

/* dropdown continua claro */
.dropdown{
  right:0;
}

/* responsivo */
@media (max-width: 720px){
  .bar-left{ min-width: 0; }
  .user-name{ display:none; }
}

.download-actions {
  text-align: center;
}

/* Layout estilo YouTube: vídeo grande + materiais abaixo (por padrão) */
.ead-split{
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 14px;
}

/* Em telas bem largas, pode jogar materiais para o lado sem encolher demais */
@media (min-width: 1400px){
  .ead-split{
    grid-template-columns: 1.7fr 0.9fr;
    align-items: start;
  }
}

/* Player grande */
.video{
  width: 100%;
  max-width: 1280px;     /* largura máxima */
  aspect-ratio: 16 / 9;  /* 1280x720 */
  height: auto;
  background: #000;
  display: block;
  margin: 0 auto;        /* centraliza */
  border-radius: 12px;
}

/* PDF grande também */
.pdf{
  width:100%;
  height:70vh;
  border:0;
}

@media (max-width: 560px){
  .video{ height: 42vh; min-height: 240px; }
  .pdf{ height: 55vh; }
}

/* Lista de PDFs */
.ead-pdf-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top: 10px;
}
.ead-pdf-item{
  display:block;
  padding:10px 12px;
  border:1px solid #eee;
  border-radius:10px;
  text-decoration:none;
  color: inherit;
}
.ead-pdf-item:hover{
  background:#fafafa;
}

/* =====================
   CONTAINER LARGO (ADMIN)
===================== */
.container--wide{
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
}

/* Tabela administrativa */
.table-wrap{
  overflow-x: auto;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
}

/* Garante espaço mínimo para colunas */
.table-wrap table{
  width:100%;
  min-width: 1100px;
  border-collapse: collapse;
}

.table-wrap th,
.table-wrap td{
  padding:10px 12px;
  border-bottom:1px solid var(--border);
  font-size:13px;
  vertical-align: middle;
  white-space: nowrap;
}

/* Permite quebra controlada só onde interessa */
.table-wrap td.col-name,
.table-wrap td.col-email{
  white-space: normal;
  max-width: 260px;
}

/* Ações SEM empilhar */
.actions{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap: nowrap;
}

.actions form{
  margin:0;
  display:inline-flex;
}

/* Botões compactos */
.btn-sm{
  height:32px;
  font-size:13px;
  padding:0 12px;
  width:auto;
  white-space: nowrap;
}

.top-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.search{
  display:flex;
  align-items:center;
  gap:10px;
  flex:1;
  min-width: 420px;
}

.search input{ height:36px; }
