/* ======= ESTILOS GLOBALES ======= */
body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f4f6f9;
    margin: 0;
    padding: 30px;
    color: #333;
}

/* ======= CONTENEDOR PRINCIPAL ======= */
.container {
    width: 100%;
    max-width: 100%;
    margin: auto;
    background: #fff;
    border-radius: 16px;
    padding: 30px 40px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* ======= TÍTULO ======= */
h1 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 20px;
    color: #339dff;
    font-weight: normal;
}

/* ======= BOTÓN VOLVER ======= */
.btn-volver {
    text-align: center;
    margin-bottom: 25px;
}

.btn-volver a {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: normal;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.btn-volver a:hover {
    background-color: #0056b3;
}

/* ======= BUSCADOR ======= */
input#buscador {
    display: block;
    margin: 0 auto 25px auto;
    padding: 12px;
    width: 100%;
    max-width: 600px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

/* ======= TABLA PRINCIPAL ======= */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

thead {
    background-color: #007bff;
}

thead th {
    background-color: #007bff !important;
    color: white !important;
    position: relative;
    z-index: 1;
    padding: 12px;
    font-size: 0.9rem;
    text-align: center;
    font-weight: normal;
    border-bottom: 1px solid #e2e2e2;
    white-space: nowrap;
}

td {
    padding: 12px;
    font-size: 0.9rem;
    text-align: center;
    font-weight: normal;
    border-bottom: 1px solid #eee;
    white-space: normal;
}

tbody tr:hover td {
    background-color: #f4f9ff;
}

/* ======= SUBTABLA DE PRODUCTOS (SKU - Cantidad) ======= */
td.productos {
    padding: 0;
}

.productos-subtabla {
    width: 100%;
    border-collapse: collapse;
}

/* ⭐ CAMBIO A AZUL MÁS CLARO EN ENCABEZADO DE SUBTABLA ⭐ */
.productos-subtabla thead th {
    background-color: #66b3ff
 !important; /* azul claro visible */
    color: #2c3e50;
    font-size: 0.85rem;
    font-weight: normal;
    padding: 6px;
    border-bottom: 1px solid #cbdcea;
}


.productos-subtabla td {
    font-size: 0.85rem;
    font-weight: normal;
    padding: 6px;
    border-top: 1px solid #ddd;
    text-align: center;
}

/* ======= ENLACES ======= */
td a {
    color: #007bff;
    text-decoration: underline;
    font-weight: normal;
}

.btn-descargar {
    background-color: #28a745;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background-color 0.3s ease;
    display: inline-block;
}

.btn-descargar:hover {
    background-color: #218838;
}


.btn-eliminar {
    background-color: #e74c3c;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-eliminar:hover {
    background-color: #c0392b;
}

/* Ocultar checkbox nativo */
.checkbox-wrapper input[type="checkbox"] {
  display: none;
}

/* Caja personalizada */
.checkbox-wrapper .checkmark {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid #007bff;   /* Azul */
  background-color: white;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Hover efecto */
.checkbox-wrapper .checkmark:hover {
  background-color: #e6f0ff;
}

/* Palomita */
.checkbox-wrapper .checkmark::after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Cuando está checked */
.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
  background-color: #007bff;
  border-color: #007bff;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
  display: block;
}
