/* =========================
   RESET BÁSICO
========================= */
* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #121212;
  color: #eee;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  margin: 0;
}

/* =========================
   FONDO DESENFOCADO
========================= */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("../img/fondo.jpg");
  background-size: cover;
  background-position: center;
  filter: blur(5px);
  transform: scale(1.05);
}

/* =========================
   LOGIN
========================= */
.login-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #1e1e1e;
  padding: 30px;
  border-radius: 12px;
  width: 300px;
  text-align: center;
  box-shadow: 0 0 20px rgba(33, 150, 243, 0.25);
}

/* =========================
   INPUTS
========================= */
input,
select,
textarea {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border: none;
  border-radius: 5px;
  background-color: #2a2a2a;
  color: #fff;
}

/* =========================
   BOTONES - BASE
========================= */
button,
.btn-volver,
.btn-del,
.btn-mov,
.btn-logout,
.btn-edit,
.btn-ingresar,
.btn-historial,
.btn-accion,
.btn-editar,
.btn-eliminar {
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  padding: 10px 18px;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}

/* =========================
   SOMBRA AZUL BASE
========================= */
button,
.btn-volver,
.btn-mov,
.btn-ingresar,
.btn-accion,
.btn-editar {
  box-shadow: 0 0 8px rgba(33, 150, 243, 0.35);
}

/* =========================
   HOVER SOMBRA AZUL
========================= */
button:hover,
.btn-volver:hover,
.btn-mov:hover,
.btn-ingresar:hover,
.btn-accion:hover,
.btn-editar:hover {
  box-shadow: 0 0 14px rgba(33, 150, 243, 0.8);
  transform: scale(1.05);
}

/* =========================
   COLORES DE BOTONES
========================= */
button {
  background-color: #4caf50;
}

button:hover {
  background-color: #43a047;
}

.btn-volver {
  background: #ff7403;
  min-width: 120px;
}

.btn-volver:hover {
  background: #994704;
}

.btn-ingresar,
.btn-mov {
  background: #43a047;
}

.btn-del,
.btn-logout,
.btn-historial,
.btn-eliminar {
  background: #e53935;
  box-shadow: 0 0 8px rgba(244, 67, 54, 0.35);
}

.btn-del:hover,
.btn-logout:hover,
.btn-historial:hover,
.btn-eliminar:hover {
  box-shadow: 0 0 14px rgba(244, 67, 54, 0.8);
}

.btn-historial:hover {
  background: #c62828;
}

/* =========================
   ANIMACIÓN ERROR LOGIN
========================= */
.shake {
  animation: shake 0.5s;
}

@keyframes shake {
  0% {
    transform: translate(-50%, -50%);
  }
  25% {
    transform: translate(-48%, -50%);
  }
  50% {
    transform: translate(-52%, -50%);
  }
  75% {
    transform: translate(-48%, -50%);
  }
  100% {
    transform: translate(-50%, -50%);
  }
}

/* =========================
   HEADER
========================= */
header {
  width: 100%;
  padding: 20px;
  background: #222;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

/* =========================
   CONTENEDORES
========================= */
.contenedor {
  width: 90%;
  max-width: 1800px;
  padding: 20px;
  margin: 20px 0;
  flex: 1;
}

.form-section,
.tabla-section {
  background: #1e1e1e;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
}

/* =========================
   BUSCADOR
========================= */
.search-form form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.search-input-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-info {
  font-size: 0.95rem;
  color: #9ecbff;
  background: rgba(0, 136, 255, 0.08);
  padding: 8px 12px;
  border-left: 4px solid #2196f3;
  border-radius: 6px;
}

/* =========================
   TABLAS
========================= */
table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid #333;
  text-align: left;
}

/* =========================
   ACCIONES TABLA
========================= */
.actions-cell {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
}

/* =========================
   FOOTER
========================= */
footer {
  width: 100%;
  background-color: #222;
  color: #aaa;
  text-align: center;
  padding: 20px 0;
  margin-top: auto;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 600px) {
  table,
  th,
  td {
    font-size: 12px;
  }

  .form-section,
  .tabla-section {
    padding: 10px;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
  }
}
