/* Reset básico */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    color: #333;
}

body {
    background: #f5f7fa;
    padding: 2rem;
    min-height: 100vh;
}

/* Contenedor principal */
.contenedor {
    max-width: 1200px;
    margin: 0 auto;
}

/* Título */
h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #2c3e50;
    font-weight: 600;
}

/* Formulario de búsqueda */
form {
    max-width: 500px;
    margin: 0 auto 2rem auto;
    display: flex;
    gap: 0.5rem;
}

.logo {
    display: block;
    max-width: 120px;
    margin: 0 auto 20px auto;
}

form input[type="text"] {
    flex: 1;
    padding: 0.6rem 1rem;
    font-size: 1rem;
    border: 2px solid #ccc;
    border-radius: 5px;
    transition: border-color 0.3s ease;
}

form input[type="text"]:focus {
    border-color: #3498db;
    outline: none;
}

form button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

form button:hover {
    background-color: #2980b9;
}

/* Tabla */
table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

thead {
    background-color: #3498db;
    color: white;
}

thead th {
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    font-size: 1rem;
}

tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: #f0f8ff;
}

tbody td {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

tbody tr td[colspan="6"] {
    text-align: center;
    font-style: italic;
    color: #666;
}

/* Estados */
.estado-devuelto {
    color: #27ae60; /* verde más suave y agradable */
    font-weight: 700;
    background-color: #d4efdf;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    display: inline-block;
    text-align: center;
    min-width: 70px;
}

.estado-prestado {
    color: #c0392b; /* rojo intenso */
    font-weight: 700;
    background-color: #f9d6d5;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    display: inline-block;
    text-align: center;
    min-width: 70px;
}

/* Botón Volver */
.volver-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.btn-volver {
    background-color: #e5e7eb;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: #111827;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-volver:hover {
    background-color: #cbd5e1;
}

/* Paginación */
.paginacion {
    margin-top: 1.5rem;
    text-align: center;
}

.paginacion a {
    display: inline-block;
    margin: 0 0.3rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid #3498db;
    border-radius: 5px;
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.paginacion a:hover {
    background-color: #3498db;
    color: white;
}

.paginacion a.activa {
    background-color: #2980b9;
    color: white;
    border-color: #2980b9;
}

/* Responsive */
@media (max-width: 600px) {
    form {
        flex-direction: column;
    }

    form button {
        width: 100%;
        padding: 0.7rem;
        margin-top: 0.5rem;
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead tr {
        display: none;
    }

    tbody tr {
        margin-bottom: 1rem;
        background: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        border-radius: 8px;
        padding: 1rem;
    }

    tbody td {
        padding: 0.5rem 0;
        position: relative;
        padding-left: 50%;
        font-size: 0.9rem;
    }

    tbody td::before {
        position: absolute;
        top: 0.5rem;
        left: 1rem;
        width: 45%;
        white-space: nowrap;
        font-weight: 600;
        color: #3498db;
        content: attr(data-label);
    }
}