/* 🌐 Estilo global */
body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #f7f9fc, #eef1f6);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  margin: 0;
  padding-top: 40px;
  color: #222;
}

/* 🧩 Contenedor principal */
.contenedor {
  width: 90%;
  max-width: 720px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 32px 24px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
  text-align: center;
  animation: fadeIn 0.7s ease;
}

/* 🪞 Logo + título */
.titulo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 25px;
}

/* 👋 Logo + GIF juntos */
.logo-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}

.logo {
  height: 70px;
  max-width: 150px;
  object-fit: contain;
  border-radius: 12px;
  transition: transform 0.4s ease;
}

.logo:hover {
  transform: scale(1.06);
}

/* 👋 GIF animado al lado del logo */
.gif-hi {
  width: 45px;
  height: 45px;
  object-fit: contain;
  border-radius: 50%;
  animation: floatHi 2s ease-in-out infinite;
}

/* ✨ Efecto de flotación del GIF */
@keyframes floatHi {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

h1 {
  font-size: 1.8em;
  color: #1f2937;
  letter-spacing: -0.5px;
  font-weight: 600;
  margin: 0;
}

/* 🔎 Buscador */
.busqueda {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

#buscador {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 16px;
  width: 70%;
  min-width: 250px;
  transition: all 0.2s ease;
}

#buscador:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0,123,255,0.15);
}

/* 🧠 Botón transparente elegante */
#btnBuscar {
  padding: 12px 26px;
  border-radius: 12px;
  border: 1.5px solid #007bff;
  background: transparent;
  color: #007bff;
  font-weight: 500;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.25s ease;
}

#btnBuscar:hover {
  background: #007bff;
  color: white;
  box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

/* 📊 Resultados */
#resultado {
  margin-top: 25px;
  overflow-x: auto; /* 👈 permite desplazamiento lateral */
  border-radius: 14px;
}

/* 🪄 Tabla minimalista */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  font-size: 14.5px;
  min-width: 650px; /* 👈 asegura que no se encoja demasiado */
}

th {
  background: #007bff;
  color: white;
  font-weight: 500;
  padding: 10px;
  white-space: nowrap;
}

td {
  padding: 10px;
  border-bottom: 1px solid #e5e7eb;
  color: #333;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background-color: #f9fafb;
}

/* 🖼️ Imágenes dentro de la tabla */
img {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* 💫 Animación de entrada */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 🎨 Botón Editar */
.btnEditar {
  padding: 6px 10px;
  border: none;
  background: #007bff;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}

.btnEditar:hover {
  background: #005ecb;
}

/* 📱 Adaptación móvil con tabla desplazable */
@media (max-width: 700px) {
  .contenedor {
    width: 95%;
    padding: 20px;
  }

  h1 {
    font-size: 1.4em;
  }

  #buscador {
    width: 100%;
  }

  table {
    font-size: 13px;
  }

  img {
    width: 50px;
    height: 50px;
  }

  .gif-hi {
    width: 35px;
    height: 35px;
  }

  #resultado {
    overflow-x: scroll; /* 👈 asegura que puedas deslizar */
  }

  /* ✨ Ajuste visual para texto y descripciones en móviles */
  td {
    white-space: normal; /* 👈 permite salto de línea */
    text-align: left;
    line-height: 1.4em;
  }

  td div {
    font-size: 13px;
    color: #444;
    margin-top: 3px;
  }
}

