/* ===== RESET Y ESTILOS BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  width: 100%;
  min-height: 100vh;
  font-family: 'Poppins', 'Segoe UI', Roboto, sans-serif;
  background: url('../img/imagenfondo4.jpg') no-repeat center center fixed;
  background-size: cover;
  position: relative;
  overflow-x: hidden;
}

/* Overlay oscuro pero no demasiado, para que se vea la imagen */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3); /* Ajusta la opacidad a tu gusto */
  backdrop-filter: blur(3px); /* Un pequeño difuminado */
  z-index: -1;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.container.lg-12 {
  background: rgba(255, 255, 255, 0.85); /* Fondo blanco semitransparente */
  backdrop-filter: blur(10px);
  border-radius: 40px 40px 30px 30px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 0 0 2px #ff8a37 inset;
  margin: 30px auto;
  padding: 30px 25px !important;
  max-width: 1400px;
  width: 95%;
  transition: all 0.3s;
  border: 1px solid rgba(255,138,55,0.3);
}

/* ===== PESTAÑAS (TABS) ===== */
.nav-tabs {
  border-bottom: 3px solid #ff8a37;
  gap: 10px;
  margin-bottom: 20px;
}

.nav-tabs .nav-link {
  background: rgba(255, 255, 255, 0.6);
  border: none;
  border-radius: 30px 30px 0 0;
  color: #333;
  font-weight: 600;
  padding: 12px 25px;
  transition: all 0.3s;
  backdrop-filter: blur(5px);
  margin-right: 5px;
}

.nav-tabs .nav-link:hover {
  background: #ff8a37;
  color: white;
  transform: translateY(-3px);
}

.nav-tabs .nav-link.active {
  background: #ff8a37;
  color: white;
  border-bottom: 3px solid #dc3545;
}

/* ===== TÍTULOS ===== */
h1 {
  color: #ff8a37;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
  border-left: 8px solid #dc3545;
  padding-left: 20px;
  margin: 30px 0;
  font-size: 2.5rem;
}

/* ===== FORMULARIOS ===== */
.form-control, select, textarea {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 2px solid #ff8a37 !important;
  border-radius: 20px !important;
  padding: 12px 15px !important;
  font-size: 1rem;
  transition: all 0.3s;
  color: #333;
  box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.form-control:focus, select:focus, textarea:focus {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 4px rgba(220,53,69,0.2), 0 5px 15px rgba(0,0,0,0.2) !important;
  outline: none;
  background: white !important;
  transform: scale(1.02);
}

label {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
  display: block;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.required-field::after {
  content: " *";
  color: #dc3545;
  font-weight: bold;
}

/* Botón buscar */
#btnBuscarComputers {
  background: linear-gradient(45deg, #ff8a37, #dc3545);
  border: none;
  border-radius: 50px;
  padding: 12px 30px;
  font-weight: 700;
  color: white;
  box-shadow: 0 10px 20px rgba(255,138,55,0.4);
  transition: all 0.3s;
  width: auto;
  min-width: 150px;
  border: 1px solid rgba(255,255,255,0.3);
}

#btnBuscarComputers:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 20px 30px rgba(220,53,69,0.5);
  background: linear-gradient(45deg, #dc3545, #ff8a37);
}

/* Select de equipos */
#selectEquipos {
  background: white;
  border-radius: 20px;
  padding: 12px;
  width: 100%;
  border: 2px solid #ff8a37;
  font-weight: 500;
}

/* ===== TARJETAS DE FORMULARIOS (PC Y SMARTPHONE) ===== */
#formPC, #formSmartphone {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  padding: 30px 25px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2), 0 0 0 3px #ff8a37 inset;
  margin-top: 30px;
  border: 1px solid rgba(255,138,55,0.5);
}

/* ===== CAMPOS DE FIRMA (CANVAS) ===== */
canvas {
  background: white;
  border-radius: 30px !important;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  transition: all 0.3s;
  max-width: 100%;
  height: auto;
  border: 3px solid #ff8a37 !important;
}

canvas:hover {
  box-shadow: 0 15px 30px rgba(255,138,55,0.4);
  transform: scale(1.02);
}

.botonLimpiar {
  background: #6c757d;
  border: none;
  border-radius: 30px;
  padding: 8px 20px;
  color: white;
  font-weight: 600;
  transition: all 0.3s;
  border: 1px solid #ff8a37;
}

.botonLimpiar:hover {
  background: #dc3545;
  transform: scale(1.05);
}

/* ===== BOTÓN REGISTRAR DEVOLUCIÓN ===== */
.btn-submit {
  background: linear-gradient(135deg, #ff8a37, #dc3545);
  border: none;
  border-radius: 50px;
  padding: 15px 40px;
  font-size: 1.2rem;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  letter-spacing: 2px;
  box-shadow: 0 15px 25px rgba(220,53,69,0.4);
  transition: all 0.4s;
  display: block;
  margin: 30px auto 0;
  width: fit-content;
  border: 2px solid rgba(255,255,255,0.3);
  cursor: pointer;
}

.btn-submit:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 25px 35px rgba(255,138,55,0.6);
  background: linear-gradient(135deg, #dc3545, #ff8a37);
}

/* ===== TABLA DE REGISTROS ===== */
#table-content {
  margin-top: 20px;
}

/* Botones de la tabla */
#btnCargarRegistros3, #btnDescargarPDF3 {
  border-radius: 40px;
  padding: 12px 30px;
  font-weight: 700;
  border: none;
  transition: all 0.3s;
  box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

#btnCargarRegistros3 {
  background: #28a745;
  color: white;
}

#btnCargarRegistros3:hover {
  background: #218838;
  transform: translateY(-3px);
  box-shadow: 0 15px 25px rgba(40,167,69,0.4);
}

#btnDescargarPDF3 {
  background: #dc3545;
  color: white;
}

#btnDescargarPDF3:hover:not(:disabled) {
  background: #c82333;
  transform: translateY(-3px);
  box-shadow: 0 15px 25px rgba(220,53,69,0.4);
}

#btnDescargarPDF3:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Estilo para la tabla DataTables */
#tablaRegistros3 {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  border: 2px solid #ff8a37;
}

#tablaRegistros3 thead {
  background: #ff8a37;
  color: white;
}

#tablaRegistros3 thead th {
  padding: 15px;
  font-weight: 600;
  border: none;
}

#tablaRegistros3 tbody tr {
  transition: all 0.2s;
}

#tablaRegistros3 tbody tr:hover {
  background: rgba(255,138,55,0.2) !important;
  cursor: pointer;
}

#tablaRegistros3 tbody tr.selected {
  background: rgba(220,53,69,0.3) !important;
  border-left: 5px solid #dc3545;
}

/* Ajustes para las imágenes de firma en la tabla */
#tablaRegistros3 img {
  border-radius: 15px;
  box-shadow: 0 5px 10px rgba(0,0,0,0.2);
  max-width: 100px;
  border: 2px solid #ff8a37;
}

/* ===== SPINNER ===== */
.spinner3 {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #ff8a37;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .container.lg-12 {
    padding: 20px 15px !important;
    border-radius: 30px;
  }

  h1 {
    font-size: 1.8rem;
    border-left-width: 5px;
  }

  .nav-tabs .nav-link {
    padding: 8px 15px;
    font-size: 0.9rem;
  }

  #btnBuscarComputers {
    width: 100%;
  }

  .btn-submit {
    width: 100%;
    text-align: center;
  }

  canvas {
    max-width: 100%;
  }

  #tablaRegistros3 {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  .form-control, select, textarea {
    padding: 10px !important;
  }

  .btn-submit {
    font-size: 1rem;
    padding: 12px;
  }
}