/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Estilos del header y navegación */
header {
    background-color: #333;
    color: white;
    padding: 1rem;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
}

nav ul li a:hover {
    color: #ddd;
}

/* Estilos del contenido principal */
main {
    max-width: 99%;
    margin: 0.5rem auto;
    padding: 0 0.5rem;
}

h1 {
    color: #333;
    margin-bottom: 1rem;
}

/* Estilos del formulario de login */
.login-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input[type="submit"] {
    width: 100%;
    padding: 0.75rem;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.form-group input[type="submit"]:hover {
    background-color: #444;
}

.error-message {
    color: #dc3545;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #dc3545;
    border-radius: 4px;
    background-color: #f8d7da;
}

/* Estilos para la administración */
.admin-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.form-section {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.success-message {
    color: #28a745;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #28a745;
    border-radius: 4px;
    background-color: #d4edda;
}

.users-list {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

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

th {
    background-color: #f8f9fa;
    font-weight: bold;
}

tr:hover {
    background-color: #f5f5f5;
}

select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Estilos del dashboard */
.dashboard-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.dashboard-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.dashboard-card h3 {
    color: #333;
    margin-bottom: 1rem;
}

.dashboard-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #333;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #444;
}

/* Estilos del formulario de entrada */
.form-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.entrada-form {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.form-section {
    margin-bottom: 2rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-section h2 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.2rem;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-submit,
.btn-reset {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-submit {
    background-color: #28a745;
    color: white;
}

.btn-submit:hover {
    background-color: #218838;
}

.btn-reset {
    background-color: #6c757d;
    color: white;
}

.btn-reset:hover {
    background-color: #5a6268;
}

/* Estilos de la tabla */
.table-container {
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.search-box input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 300px;
}

.table-responsive {
    width: 100%;
    margin: 0;
    padding: 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    font-size: 0.6rem;
    table-layout: fixed;
    line-height: 1.2;
}

.data-table th,
.data-table td {
    padding: 0.15rem 0.05rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.data-table td {
    padding-right: 1px;
}

.data-table tr {
    height: 22px;
}

.data-table th:nth-child(1), /* Fecha */
.data-table td:nth-child(1) {
    width: 60px;
}

.data-table th:nth-child(2), /* Folio */
.data-table td:nth-child(2) {
    width: 50px;
}

.data-table th:nth-child(3), /* Boleta */
.data-table td:nth-child(3) {
    width: 50px;
}

.data-table th:nth-child(4), /* Placa */
.data-table td:nth-child(4) {
    width: 60px;
}

.data-table th:nth-child(5), /* Peso */
.data-table td:nth-child(5) {
    width: 50px;
}

.data-table th:nth-child(6), /* Bins */
.data-table td:nth-child(6) {
    width: 40px;
}

.data-table th:nth-last-child(3), /* Observaciones */
.data-table td:nth-last-child(3) {
    width: 90px;
    white-space: normal;
    padding: 0.15rem 0.05rem;
}

.data-table th:nth-last-child(2), /* Fecha Registro */
.data-table td:nth-last-child(2) {
    width: 70px;
    white-space: nowrap;
    padding: 0.15rem 0.05rem;
}

.data-table th:last-child,
.data-table td:last-child {
    width: 85px;
    white-space: nowrap;
    padding: 0.15rem 0.05rem;
    text-align: center;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    position: sticky;
    top: 0;
    font-size: 0.6rem;
    padding: 0.15rem 0.05rem;
}

.data-table tbody tr:hover {
    background-color: #f5f5f5;
}

.data-table td {
    padding: 0.05rem 0.1rem;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-add {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn-add:hover {
    background-color: #218838;
}

.btn-edit,
.btn-delete {
    padding: 0.2rem 0.3rem;
    color: white;
    text-decoration: none;
    border-radius: 2px;
    margin: 0;
    font-size: 0.55rem;
    display: inline-block;
    min-width: 25px;
    text-align: center;
    border: none;
    cursor: pointer;
    line-height: 1;
    height: 18px;
}

.btn-edit {
    background-color: #007bff;
    width: auto;
}

.btn-delete {
    background-color: #dc3545;
    width: auto;
    margin-left: 2px;
}

.btn-edit:hover {
    background-color: #0056b3;
}

.btn-delete:hover {
    background-color: #c82333;
}

.actions {
    white-space: nowrap;
}

/* Paginación */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.pagination a {
    padding: 0.5rem 1rem;
    background-color: #fff;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
}

.pagination a:hover {
    background-color: #f5f5f5;
}

.pagination a.active {
    background-color: #333;
    color: white;
    border-color: #333;
}

/* Estilos del footer */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem;
    position: fixed;
    bottom: 0;
    width: 100%;
}

/* Estilos para el checkbox de inventario */
.form-group input[type="checkbox"] {
    margin-right: 0.5rem;
    vertical-align: middle;
}

.form-group label input[type="checkbox"] {
    cursor: pointer;
}

.form-group label {
    cursor: pointer;
    user-select: none;
}

.checkbox-group {
    margin: 1rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Ajustar el estilo del checkbox cuando está marcado */
.checkbox-label input[type="checkbox"]:checked {
    accent-color: #4CAF50;
}

/* Estilos para el resumen de inventario */
.summary-box {
    display: flex;
    justify-content: space-around;
    margin: 1rem 0 2rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.summary-item {
    text-align: center;
    padding: 1rem 2rem;
}

.summary-item h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.1rem;
}

.summary-item p {
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
    color: #28a745;
}
