{
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    padding: 20px;
    margin: 0;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* MODIFICACIÓN: Se cambió .header por header para coincidir con la etiqueta de index.php */
header, .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

header h1, .header h2 {
    margin: 0;
    font-size: 24px;
}

.user-info {
    font-size: 14px;
    color: #666;
}

/* MODIFICACIÓN: Ocultar el contenedor de persistencia para que no afecte el diseño */
#inputs-persistentes {
    display: none !important;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

.info {
    background-color: #d1ecf1;
    color: #0c5460;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #bee5eb;
}

.search-box {
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 12px;
    border: 1px solid #007bff; /* Color destacado para el buscador */
    border-radius: 4px;
    font-size: 16px;
}

.table-container, .table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

table thead {
    background-color: #007bff;
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

table th, table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table tbody tr:hover {
    background-color: #f9f9f9;
}

/* Ajustes de columnas */
table th:nth-child(1), table td:nth-child(1) { width: 80px; text-align: center; }
.cantidad-input {
    width: 65px;
    text-align: center;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.checkbox-section {
    background-color: #e7f3ff;
    border: 1px solid #b3d9ff;
    color: #004085;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.carrito-section {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    margin-top: 20px;
    border: 1px solid #ddd;
}

#carrito {
    background-color: white;
    padding: 15px;
    border-radius: 4px;
    min-height: 50px;
    border: 1px solid #ddd;
    margin-bottom: 15px;
    max-height: 400px;
    overflow-y: auto;
}

/* MODIFICACIÓN: Animación para notar cuando se agrega un producto al carrito */
.carrito-item {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

button {
    background-color: #28a745; /* Verde para acción positiva de enviar */
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
}

button:hover {
    background-color: #218838;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 20px 0;
}

.pagination a, .pagination span {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #007bff;
}

.pagination .current, .pagination .active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination .disabled {
    color: #ccc;
    pointer-events: none;
}