/* Estilos generales */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom, #1a2a6c, #1a2a6c, #4a90e2);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Estilos del contenedor del encabezado */
header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Estilos del encabezado */
header {
    background-color: #4a90e2;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

/* Estilos de la navegación */
header nav {
    display: flex;
}

header nav a {
    color: white; /* Color de los enlaces */
    text-decoration: none;
    margin-left: 20px;
    font-size: 18px;
    transition: color 0.3s ease, background-color 0.3s ease;
    padding: 8px 12px;
    border-radius: 4px;
}

header nav a:hover {
    background-color: #2a6fb2;
    color: #ffffff; /* Color de los enlaces en hover */
}

/* Estilos del dashboard */
.dashboard {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    flex: 1;
}

.dashboard h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 32px;
    color: #ffffff;
}

.dashboard-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.dashboard-buttons .btn {
    background-color: #4a90e2;
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.dashboard-buttons .btn:hover {
    background-color: #2a6fb2;
    transform: translateY(-5px);
}

/* Estilos del pie de página */
footer {
    background-color: #4a90e2;
    color: white;
    padding: 15px 0;
    text-align: center;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

footer p {
    margin: 0;
    font-size: 14px;
}

/* Estilos para dispositivos móviles */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    header h1 {
        margin-bottom: 10px;
    }

    header nav a {
        margin-left: 0;
        margin-bottom: 5px;
    }

    .dashboard-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Estilos para el formulario de login */
.login-form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(to bottom, #1a2a6c, #1a2a6c, #4a90e2);
}

.login-form {
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
}

.avatar {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.login-form h2 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 26px;
    color: #333;
}

.login-form .form-group {
    margin-bottom: 20px;
    text-align: left;
    position: relative;
}

.login-form .form-group label {
    position: absolute;
    top: 10px;
    left: 10px;
    color: #555;
}

.login-form .form-group input {
    width: 100%;
    padding: 10px 10px 10px 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.login-form .form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.login-form .form-options label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
}

.login-form .form-options a {
    font-size: 14px;
    color: #4a90e2;
    text-decoration: none;
}

.login-form .form-options a:hover {
    text-decoration: underline;
}

.login-form .btn-login {
    background-color: #4a90e2;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.login-form .btn-login:hover {
    background-color: #2a6fb2;
}

.login-form .error {
    color: red;
    margin-bottom: 15px;
}

/* Estilos para el formulario de inventario */
.inventory-form, .inventory-list {
    width: 90%;
    margin: auto;
    margin-top: 20px;
}

.inventory-form form {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    background-color: #1a2a6c;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.inventory-form h2 {
    width: 100%;
    color: white;
    text-align: center;
    margin-bottom: 20px;
}

.inventory-form label {
    width: 100%;
    color: white;
    margin-bottom: 5px;
}

.inventory-form input, .inventory-form select {
    width: 100%;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.inventory-form input[type="text"], .inventory-form input[type="email"], .inventory-form select {
    width: 100%;
}

.inventory-form button {
    width: 100%;
    padding: 10px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.inventory-form button:hover {
    background-color: #2a6fb2;
}

.inventory-list {
    background-color: #1a2a6c;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.inventory-list h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 28px;
    color: white;
}

.inventory-list input {
    width: 100%;
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.inventory-list table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.inventory-list th, .inventory-list td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

.inventory-list th {
    background-color: #4a90e2;
    color: white;
}

.inventory-list tr:hover {
    background-color: #f2f2f2;
}

.inventory-list .actions {
    display: flex;
    justify-content: space-between;
}

.inventory-list .actions button, .inventory-list .actions a {
    background-color: #4a90e2;
    color: white;
    padding: 6px 10px;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 2px;
    font-size: 12px;
}

.inventory-list .actions button:hover, .inventory-list .actions a:hover {
    background-color: #2a6fb2;
}

/* Paginación */
.pagination {
    text-align: center;
    margin: 20px 0;
}

.pagination a {
    color: white;
    background-color: #4a90e2;
    padding: 8px 16px;
    margin: 0 4px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.pagination a:hover {
    background-color: #2a6fb2;
}

.pagination .active {
    background-color: #2a6fb2;
}

/* Detalle de fila */
.detail-row {
    display: none;
}

@media screen and (max-width: 768px) {
    .inventory-form form {
        flex-direction: column;
    }
    .inventory-form input, .inventory-form select {
        width: 100%;
    }
    table, thead, tbody, th, td, tr {
        display: block;
    }
    th {
        display: none;
    }
    tr {
        margin-bottom: 10px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 10px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    td {
        display: block;
        text-align: left;
        padding: 8px 0;
    }
    td::before {
        content: attr(data-label);
        font-weight: bold;
        display: block;
        margin-bottom: 5px;
    }
    .inventory-list td button, .inventory-list td a {
        margin: 5px 0;
    }
    .inventory-list .actions {
        display: flex;
        flex-direction: column;
    }
}