/* ===========================
   Paleta base (Maker Brasil)
   =========================== */

:root {
  --maker-primary: #3baeff;
  --maker-primary-soft: #63eaff;
  --maker-success: #30daa6;
  --maker-warning: #ffb300;
  --maker-danger: #ff650e;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-700: #374151;
  --gray-800: #1f2933;
  --gray-900: #111827;
}

/* ===========================
   Base
   =========================== */

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  background: var(--gray-100);
}

/* ===========================
   Topbar / Navegação
   =========================== */

.topbar {
  background: #111827;
  color: #f9fafb;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
}

.nav a {
  color: #e5e7eb;
  margin-left: 12px;
  text-decoration: none;
}

.nav a:hover {
  text-decoration: underline;
}

/* Logout em formulário (Django 5 exige POST) */

.nav form {
  display: inline;
  margin: 0;
}

.btn-link-logout {
  background: none;
  border: none;
  color: #e5e7eb;
  cursor: pointer;
  font: inherit;
  padding: 0;
  margin-left: 12px;
}

.btn-link-logout:hover {
  text-decoration: underline;
}

/* ===========================
   Layout de conteúdo
   =========================== */

.container {
  max-width: 960px;
  margin: 24px auto;
  padding: 0 16px;
}

/* ===========================
   Cards e estrutura
   =========================== */

.card {
  background: #ffffff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .05);
  margin-bottom: 16px;   /* <<< adiciona este */
}

/* card de login antigo (ainda pode ser útil se usado em alguma tela) */
.card-login {
  max-width: 400px;
  margin: 60px auto;
}

/* ===========================
   Botões
   =========================== */

button {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
}

button:hover {
  background: #1d4ed8;
}

/* link em formato de botão */
.btn-link {
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #2563eb;
  color: #2563eb;
  font-size: 0.9rem;
  background: #ffffff;        /* <-- garante contraste */
  cursor: pointer;            /* fica com cara de botão */
}

.btn-link:hover {
  background: #2563eb;
  color: #fff;
}

.btn-link:hover {
  background: #2563eb;
  color: #fff;
}

/* botão principal usando a paleta Maker */

.btn-primary {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--maker-primary);  /* cor principal Maker */
  color: #020617;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--maker-primary-soft); /* variação mais clara */
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(59, 174, 255, 0.35);
}

/* ===========================
   Badges / selos
   =========================== */

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: #e5e7eb;
  color: #111827;
}

.badge-green {
  background: #bbf7d0;
  color: #166534;
}

/* você pode criar outras se precisar, ex:
.badge-yellow { background: #fef3c7; color: #92400e; }
*/

/* ===========================
   Certificado
   =========================== */

.certificado {
  text-align: center;
  border: 2px solid #e5e7eb;
  background: #fefce8;
}

.certificado h1 {
  margin-bottom: 24px;
}

.certificado h2 {
  margin: 16px 0;
}

/* ===========================
   Tabelas
   =========================== */

.tabela {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  background: #fff;
}

.tabela th,
.tabela td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.tabela th {
  background: #f3f4f6;
  font-weight: 600;
}

/* ===========================
   Formulários
   =========================== */

.form-group {
  margin-bottom: 12px;
}

.input-text {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
}

.input-text:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

/* ===========================
   Layout LOGIN – clean, centralizado
   =========================== */

.auth-layout {
  min-height: calc(100vh - 70px); /* considerando a barra do topo */
  display: flex;
  justify-content: center;    /* centraliza horizontalmente */
  align-items: center;        /* centraliza verticalmente */
  padding: 32px 16px 40px 16px;
  background: #f3f4f6;        /* cinza clarinho */
}

.auth-panel {
  background: #ffffff;
  color: #111827;
  border-radius: 18px;
  padding: 24px 24px 28px 24px;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;             /* garante centralização dentro do container */
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.25),
    0 0 0 1px rgba(148, 163, 184, 0.25);
}

.auth-panel-inner {
  width: 100%;
  max-width: 320px;           /* encolhe um pouco o conteúdo */
  margin: 0 auto;             /* centraliza o miolo dentro do card */
  text-align: center;         /* texto centralizado */
}

.auth-panel-inner h1 {
  font-size: 1.3rem;
  margin: 0 0 6px 0;
  color: #0f172a;
}

.auth-panel-inner p {
  margin: 0 0 16px 0;
  font-size: 0.9rem;
  color: #6b7280;
}

.auth-panel-inner .logo-text-main {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0f172a;
  margin-bottom: 4px;
}

/* inputs dentro do card de login */

.auth-panel input[type="text"],
.auth-panel input[type="password"],
.auth-panel input[type="email"] {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
  background: #f9fafb;
  color: #111827;
}

.auth-panel input[type="text"]:focus,
.auth-panel input[type="password"]:focus,
.auth-panel input[type="email"]:focus {
  outline: none;
  border-color: #3baeff;
  box-shadow: 0 0 0 1px rgba(59, 174, 255, 0.3);
}

/* mantém os campos alinhados à esquerda dentro do card */

.auth-panel .form-group {
  text-align: left;
}

/* botão dentro do login */

.auth-panel-inner form button[type="submit"] {
  margin-top: 8px;
}

/* responsivo login */

@media (max-width: 600px) {
  .auth-layout {
    padding: 24px 12px 32px 12px;
  }

  .auth-panel {
    padding: 20px 18px 24px 18px;
  }
}


/* ===========================
   Painel ADMIN – resumo
   =========================== */

.grid-resumo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.resumo-box {
  background: #f9fafb;
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
}

.resumo-label {
  display: block;
  font-size: 0.8rem;
  color: #6b7280;
}

.resumo-valor {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: #111827;
}

.certificado {
  text-align: center;
  border: 2px solid #e5e7eb;
  background: #fefce8;
}

.atalhos-escola {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;              /* espaço entre os botões */
  margin-top: 8px;
  padding-left: 0;
}

.atalhos-escola .btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* === Meus cursos – grade de cards === */

.grid-cursos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.curso-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.07);
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.curso-card h3 {
  margin: 0 0 4px 0;
  font-size: 1.05rem;
}

.curso-escola {
  margin: 0 0 6px 0;
  font-size: 0.85rem;
  color: #6b7280;
}

.curso-meta {
  margin: 0;
  font-size: 0.8rem;
  color: #4b5563;
}

.curso-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.curso-progresso {
  margin: 6px 0 2px;
  font-size: 0.85rem;
  color: #4b5563;
}

.curso-progresso-detalhe {
  font-size: 0.8rem;
  color: #6b7280;
  margin-left: 4px;
}

.curso-progresso-barra {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  margin-top: 2px;
}

.curso-progresso-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3baeff, #63eaff);
  transition: width 0.25s ease-out;
}

.aula-conteudo {
  margin-bottom: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #111827;
}

.aula-material {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ===================== BRAND MAKER BRASIL ===================== */

.topbar {
  /* de fundo cinza escuro + leve toque de azul Maker */
  background: linear-gradient(90deg, #020617, #111827 40%, #1d4ed8 100%);
  color: #f9fafb;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo.brand-maker {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  height: 100px;
  width: auto;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  font-weight: 700;
  font-size: 1rem;
  color: #f9fafb;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* links da nav com cores da Maker */
.nav a {
  color: #e5e7eb;
  margin-left: 12px;
  text-decoration: none;
  font-size: 0.9rem;
}

.nav a:hover {
  text-decoration: none;
  color: #63eaff; /* azul claro da Maker */
}

/* botão principal já está com azul Maker, reforçando visual */
.btn-primary {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: #3baeff;           /* azul principal Maker */
  color: #020617;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .1s ease, box-shadow .1s ease, background .1s ease;
}

.btn-primary:hover {
  background: #63eaff;           /* variação mais clara Maker */
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(59, 174, 255, 0.35);
}

/* badges com cores secundárias Maker */
.badge-green {
  background: #bbf7d0;
  color: #166534;
}

.badge-warning {
  background: #ffb30022;  /* amarelo Maker suave */
  color: #92400e;
}

.badge-accent {
  background: #30daa622;  /* verde água Maker */
  color: #065f46;
}

/* material da aula: botões alinhados lado a lado */
.aula-material {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}


.site-footer {
  margin-top: 40px;
  padding: 16px 0;
  background: #020617;           /* mesmo clima da topbar */
  color: #9ca3af;
  font-size: 0.85rem;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;

  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.footer-divider {
  opacity: 0.5;
}

.site-footer a {
  color: #63eaff;
  text-decoration: none;
  font-weight: 500;
}

.site-footer a:hover {
  text-decoration: underline;
}
