/* Estilos propios de auditoria.php (antes en un <style> inline de la página).
   Los componentes compartidos viven en assets/css/componentes.css. */

.audit-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
/* El nombre del módulo es texto, no una cifra: va más chico que los números de la banda */
#stat-module { font-size: 18px; line-height: 1.35; }

.filters-card {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: none; /* app.css las pone en mayúsculas */
  letter-spacing: 0;
}
.filter-group input,
.filter-group select {
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
}
.filter-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.logs-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  overflow: hidden;
}
.logs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}
.logs-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.logs-count {
  font-size: 13px;
  color: var(--text-light);
}

.logs-table {
  width: 100%;
  border-collapse: collapse;
}
.logs-table th,
.logs-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}
.logs-table th {
  background: #f8fafc;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-light);
}
.logs-table tr:hover {
  background: #f8fafc;
  cursor: pointer;
}
.logs-table .datetime {
  font-size: 13px;
  color: var(--text-light);
  white-space: nowrap;
}
.logs-table .user-info {
  display: flex;
  flex-direction: column;
}
.logs-table .user-name {
  font-weight: 500;
}
.logs-table .user-email {
  font-size: 12px;
  color: var(--text-light);
}

/* Acción y estado en texto, sin etiquetas de color. Solo lo fallido va en rojo. */
.logs-table .accion { font-weight: 500; }
.estado { font-size: 13px; color: var(--text-light); }
.estado-failure { color: #b91c1c; font-weight: 600; }

/* Aviso de qué se está registrando (auditoría apagada o nivel reducido) */
.aviso-registro {
  margin-bottom: 20px;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-left: 4px solid #1e3a5f;
  border-radius: 10px;
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
}
.aviso-registro strong { display: block; color: var(--text-dark); font-size: 15px; }
.aviso-registro p { margin-top: 2px; }
.aviso-registro a { color: var(--primary); font-weight: 600; }

.pagination {
  border-top: 1px solid #e5e7eb;
}

.modal-content {
  width: 90%;
  max-width: 700px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px 16px;
}
.detail-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
}
.detail-value {
  font-size: 14px;
  word-break: break-word;
}
.detail-json {
  background: #f8fafc;
  padding: 12px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 12px;
  white-space: pre-wrap;
  max-height: 200px;
  overflow: auto;
}

@media (max-width: 768px) {
  .filters-grid {
    grid-template-columns: 1fr;
  }
  .logs-table {
    font-size: 13px;
  }
  .logs-table th,
  .logs-table td {
    padding: 10px 12px;
  }
}
