:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #222222;
  --muted: #666666;

  /* Verde principal do cabeçalho */
  --primary: #0f766e;

  /* Verde mais escuro do menu */
  --primary-dark: #064e3b;

  --border: #e5e7eb;
  --soft: #ecfdf5;
  --code: #f3f4f6;
}

/* Configuração geral */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Cabeçalho */
header {
  background: var(--primary);
  color: white;
  padding: 24px 20px;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 2.2rem;
  letter-spacing: 0.5px;
}

header p {
  max-width: 800px;
  margin: 8px auto 0;
  font-size: 1rem;
  opacity: 0.95;
}

/* Menu de navegação */
nav {
  background: var(--primary-dark);
  padding: 12px;
  text-align: center;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 10;
}

nav .nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.95rem;
}

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

/* Conteúdo principal */
main {
  max-width: 1000px;
  margin: 24px auto 20px;
  padding: 0 16px 16px;
}

main section:last-child {
  margin-bottom: 0;
}

section {
  margin-bottom: 20px;
}

/* Blocos principais */
.card {
  background: var(--card);
  border: none;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Títulos */
h2 {
  color: var(--primary);
  margin-top: 0;
  font-size: 1.45rem;
}

h3 {
  margin-bottom: 8px;
  color: #111827;
}

/* Textos auxiliares */
.muted {
  color: var(--muted);
}

/* Grade de informações */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

/* Cartões de estatísticas */
.stat {
  background: var(--soft);
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 12px 14px;
}

.stat .label {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.stat .value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-top: 2px;
  line-height: 1.35;
}

/* Área de downloads */
.downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.download-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  background: #ffffff;
}

.download-card strong {
  display: block;
  margin-bottom: 8px;
  color: #111827;
}

.download-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.93rem;
}

/* Botões */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  display: inline-block;
  padding: 8px 12px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

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

.btn.secondary {
  background: #374151;
}

.btn.secondary:hover {
  background: #111827;
}

/* Tabelas */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 0.94rem;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f9fafb;
  color: #374151;
}

/* Código */
code {
  background: var(--code);
  padding: 2px 6px;
  border-radius: 5px;
  font-family: Consolas, Monaco, monospace;
  font-size: 0.92rem;
}

pre {
  background: var(--code);
  padding: 16px;
  border-radius: 10px;
  overflow-x: auto;
}

pre code {
  background: transparent;
  padding: 0;
}

/* Avisos */
.notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #78350f;
  border-radius: 10px;
  padding: 16px;
  margin-top: 16px;
}

/* Rodapé */
footer {
  text-align: center;
  padding: 20px;
  color: #666666;
  font-size: 14px;
  background: #ffffff;
  border-top: 1px solid var(--border);
}

/* Responsividade */
@media (max-width: 768px) {
  header {
    padding: 22px 16px;
  }

  header h1 {
    font-size: 1.9rem;
  }

  header p {
    font-size: 0.95rem;
  }

  nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    padding: 10px 12px;
  }

  nav .nav-inner {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
  }

  nav a {
    flex: 0 0 auto;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 20px;
  }

  main {
    margin: 20px auto;
    padding: 0 14px 36px;
  }

  .card {
    padding: 18px;
  }

  table {
    font-size: 0.88rem;
  }
}

/* -------------------------------------------------
   Tabela de séries individuais - versão mobile simples
------------------------------------------------- */

@media (max-width: 768px) {
  #tabela-series {
    font-size: 0.86rem;
  }

  #tabela-series th:nth-child(2),
  #tabela-series th:nth-child(3),
  #tabela-series th:nth-child(4),
  #tabela-series th:nth-child(5),
  #tabela-series th:nth-child(6),
  #tabela-series td:nth-child(2),
  #tabela-series td:nth-child(3),
  #tabela-series td:nth-child(4),
  #tabela-series td:nth-child(5),
  #tabela-series td:nth-child(6) {
    display: none;
  }

  #tabela-series th,
  #tabela-series td {
    padding: 10px 6px;
  }

  #tabela-series th:nth-child(1),
  #tabela-series td:nth-child(1) {
    width: 60%;
  }

  #tabela-series th:nth-child(7),
  #tabela-series td:nth-child(7) {
    width: 40%;
    text-align: right;
  }

  #tabela-series td:nth-child(1) code {
    display: inline-block;
    max-width: 100%;
    word-break: break-word;
    font-size: 0.78rem;
  }

  #tabela-series td:nth-child(7) .btn-row {
    justify-content: flex-end;
    gap: 6px;
  }

  #tabela-series td:nth-child(7) .btn {
    padding: 7px 9px;
    font-size: 0.78rem;
  }

    .grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 14px;
  }

  .stat {
    padding: 10px 12px;
  }

  .stat .label {
    font-size: 0.78rem;
  }

  .stat .value {
    font-size: 0.98rem;
  }
}

/* ============================================================
   SEÇÃO DE ACESSO AO DASHBOARD
   ============================================================ */

.dashboard-secao {
  background:
    linear-gradient(
      135deg,
      rgba(13, 148, 136, 0.08),
      rgba(20, 184, 166, 0.025)
    );

  border:
    1px solid rgba(13, 148, 136, 0.22);
}

.dashboard-secao-conteudo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.dashboard-secao-texto {
  max-width: 850px;
}

.dashboard-secao-rotulo {
  display: inline-block;
  margin-bottom: 6px;

  color: #0f766e;

  font-size: 0.75rem;
  font-weight: 800;

  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dashboard-secao h2 {
  margin: 0 0 10px;

  color: #16324f;

  font-size: 1.55rem;
}

.dashboard-secao p {
  margin: 0;

  color: #5f6f7f;

  line-height: 1.65;
}

.dashboard-secao-botao {
  min-width: 170px;
  min-height: 46px;
  padding: 0 22px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #ffffff;

  background:
    linear-gradient(
      135deg,
      #0f766e,
      #14b8a6
    );

  border:
    1px solid rgba(255, 255, 255, 0.18);

  border-radius: 9px;

  font-weight: 700;
  white-space: nowrap;

  box-shadow:
    0 6px 16px rgba(15, 118, 110, 0.18);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.dashboard-secao-botao:hover {
  transform: translateY(-1px);

  background:
    linear-gradient(
      135deg,
      #115e59,
      #0d9488
    );

  box-shadow:
    0 8px 20px rgba(15, 118, 110, 0.24);
}

@media (max-width: 720px) {
  .dashboard-secao-conteudo {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .dashboard-secao-botao {
    width: 100%;
  }
}
