/* Estilos generales */
body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background-color: #f5f5f5;
}

/* Inputs generales */
input[type="text"],
input[type="number"],
input[type="file"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Botones */
button {
    padding: 10px 20px;
    margin-top: 10px;
    border: none;
    border-radius: 5px;
    background-color: #4caf50;
    color: white;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

/* --- Estilos para la vista de subir Excel --- */
#upload-form {
    margin-bottom: 20px;
}

#preview-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

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

/* --- Estilos para la vista de facturación --- */
#autocomplete-input {
    position: relative;
    margin-bottom: 5px;
}

#autocomplete-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid #ccc;
    position: absolute;
    width: 100%;
    background-color: white;
    z-index: 1000;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
}

.autocomplete-item:hover {
    background-color: #f0f0f0;
}

.autocomplete-item img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    border-radius: 5px;
}

/* Estilos para la tabla de factura */
#factura-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: white;
}

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

#factura-table th {
    background-color: #4caf50;
    color: white;
}

#factura-table input[type="number"] {
    width: 60px;
}

/* Estilos para la sección de totales */
.totales {
    margin-top: 20px;
}

.totales p {
    font-size: 18px;
    margin: 5px 0;
}

.totales input {
    width: auto;
    margin-left: 5px;
}

/* Resaltar la opción seleccionada en el autocomplete */
.autocomplete-item.selected {
    background-color: #e0e0e0;
}

.hidden {
    display: none !important;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5em;
    z-index: 1000;
}

.spinner {
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

h1 {
    text-align: center;
    margin: 20px 0;
}

#reporte-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#reporte-table th,
#reporte-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

#reporte-table th {
    background-color: #f2f2f2;
}

.totales {
    margin-top: 20px;
    text-align: right;
    font-size: 1.2em;
}

.fecha-row {
    background-color: #f4f4f4;
    font-weight: bold;
    text-align: left;
}

.total-dia {
    background-color: #e0e0e0;
    font-weight: bold;
    text-align: right;
}

.total-mes {
    background-color: #d3d3d3;
    font-weight: bold;
    text-align: right;
}

tfoot td {
    border-top: 2px solid #000;
}


.mes-container {
    margin-bottom: 2rem;
  }
  
  .reporte-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
  }
  
  .reporte-table th, .reporte-table td {
    border: 1px solid #ddd;
    padding: 8px;
  }
  
  .fecha-row {
    background-color: #f4f4f4;
    font-weight: bold;
  }
  
  .total-dia {
    background-color: #e0e0e0;
    font-weight: bold;
  }
  
  .total-mes {
    background-color: #d3d3d3;
    font-weight: bold;
  }
  