/* Configurações Gerais e Resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f4f6f9;
  color: #2d3748;
  padding: 40px 0; /* Tiramos o padding lateral daqui e deixamos no container */
  line-height: 1.5;
}

.container {
  width: 100%;
  max-width: 100%; /* Remove o limite de 1100px */
  padding-left: 40px;  /* Margem confortável na esquerda */
  padding-right: 40px; /* Margem confortável na direita */
  margin: 0 auto;
}

/* Cabeçalho */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 15px;
}

.top-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: #0b4f6c;
}

.logo-coids {
  height: 55px;
  object-fit: contain;
}

/* Campo de Filtro/Busca */
#filtro {
  display: block;
  margin-bottom: 25px;
  padding: 10px 16px;
  width: 100%;
  max-width: 350px;
  font-size: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background-color: #fff;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
  transition: all 0.2s;
}

#filtro:focus {
  outline: none;
  border-color: #0b4f6c;
  box-shadow: 0 0 0 3px rgba(11, 79, 108, 0.15);
}

/* --- DOMANDO A TABELA DO APACHE --- */

#indexlist {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  border: 1px solid #e2e8f0;
}

/* Corrigindo o Bloco Azul Gigante: Forçando uma altura normal para os títulos */
#indexlist th {
  background-color: #0b4f6c;
  padding: 12px 16px;
  text-align: left;
}

/* Estilo para os links de ordenação dentro do TH (Name, Last Modified, Size) */
#indexlist th a {
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px !important;
  #text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* IMPORTANTE: Remove a regra antiga que quebrava a primeira linha */
#indexlist tr:first-child a {
  background-color: transparent;
  color: inherit;
  font-weight: inherit;
  padding: 0;
  font-size: inherit;
}

/* Sumir com a linha de decoração do Apache no fim da tabela */
#indexlist tr:last-child {
  background: none !important;
  display: none; /* Se for a linha do <hr>, isso esconde */
}

#indexlist tr:last-child td {
  border: none;
  padding: 0;
}

/* Linhas e Células */
#indexlist tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
}

#indexlist tr:hover {
  background-color: #f8fafc !important;
}

/* Alinhamento das colunas nativas do Apache */
#indexlist td {
  padding: 14px 16px;
  vertical-align: middle;
  font-size: 14px;
  color: #334155;
}

/* Coluna de Ícones */
td.indexcolicon {
  width: 45px;
  text-align: center;
}
td.indexcolicon img {
  height: 18px;
  width: auto;
  vertical-align: middle;
  opacity: 0.7;
}

/* Links dos arquivos */
td.indexcolname a {
  color: #0b4f6c;
  text-decoration: none;
  font-weight: 500;
}
td.indexcolname a:hover {
  text-decoration: underline;
}

/* Afastando as colunas de Data e Tamanho (Alinhando à direita para padrão de tabelas) */
td.indexcollastmod {
  text-align: right;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
th.indexcollastmod {
  text-align: right;
}

td.indexcolsize {
  text-align: right;
  color: #64748b;
  font-weight: 500;
  padding-right: 24px;
}
th.indexcolsize {
  text-align: right;
  padding-right: 24px;
}

#indexlist tr.odd {
  background-color: #fafbfc;
}
#indexlist tr.even {
  background-color: #ffffff;
}

/* Rodapé */
.footer-note {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 40px;
  text-align: center;
  letter-spacing: 0.5px;
}
