body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 10px;
    background-color: #f5f5f5;
    color: #000;
    font-size: 14px;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 10px #0000001a;
    overflow-x: auto;
}

h1 {
    font-size: 1.5rem;
    margin: 10px 0;
    color: #72B42C;
    text-align: center;
}

h2 {
    font-size: 1.2rem;
    color: #000;
    margin: 8px 0;
}

.upload-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.upload-type {
    width: 100%;
    padding: 12px;
    border: 1px solid #818385;
    border-radius: 5px;
    background-color: #f9f9f9;
    box-sizing: border-box;
}

.upload-type p {
    font-size: 0.85rem;
    color: #555;
    margin: 8px 0 0;
}

.results {
    overflow-x: auto;
    margin-bottom: 20px;
}

.initial-amount {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 8px;
    background-color: #f2f2f2;
    border-radius: 5px;
    margin: 15px 0;
}

.initial-amount label {
    font-weight: bold;
    color: #000;
}

.initial-amount input {
    padding: 5px;
    border: 1px solid #818385;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.9rem;
}

th, td {
    padding: 25px 15px;
    border-bottom: 1px solid #ffffff;
    text-align: left;
    white-space: nowrap;
}

th {
    background-color: #000000b7;
    color: white;
}

tr:nth-child(even) {
    background-color: #72b42c6c;
}
tr:hover{
    background-color: #72B42C;
}

button {
    background-color: #72B42C;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 0.9rem;
    width: 100%;
}

button:hover {
    background-color: #000000;
}

#clear-btn {
    background-color: #818385;
    margin-top: 20px;
}

#clear-btn:hover {
    background-color: #6a6c6e;
}

input[type="file"] {
    margin-bottom: 10px;
    width: 100%;
}

@media (min-width: 768px) {
    body {
        padding: 20px;
        font-size: 16px;
    }
    
    .container {
        padding: 20px;
    }
    
    .upload-options {
        flex-direction: row;
    }
    
    .upload-type {
        min-width: 300px;
    }
    
    .initial-amount {
        flex-direction: row;
        align-items: center;
    }
    
    .initial-amount input {
        width: 120px;
    }
    
    table {
        font-size: 1rem;
    }
    
    button {
        width: auto;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 1200px;
    }
}

@media (max-width: 767px) {
    th {
        display: none;
    }
    
    td {
        display: block;
        height: 25px;
        width: 100%;
        box-sizing: border-box;
        border: none;
        border-bottom: 1px solid #ddd;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }
    
    td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 50%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        text-align: left;
    }
    
    td:nth-of-type(1):before { content: "Fechas"; }
    td:nth-of-type(2):before { content: "Códigos"; }
    td:nth-of-type(3):before { content: "Cliente"; }
    td:nth-of-type(4):before { content: "Contacto"; }
    td:nth-of-type(5):before { content: "Referencia"; }
    td:nth-of-type(6):before { content: "Ingresos"; }
    td:nth-of-type(7):before { content: "Gastos"; }
    td:nth-of-type(8):before { content: "Balance"; }
}


#export-btn {
    background-color: #72B42C;
    margin-top: 10px;
}

#export-btn:hover {
    background-color: #000000;
}

@media (min-width: 768px) {
    /* (El resto del media query permanece igual) */
    
    #export-btn {
        margin-right: 10px;
    }
}



/* Agregar al final de style.css */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

.amount-input {
    display: flex;
    margin-bottom: 10px;
    align-items: center;
}

.amount-input input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #818385;
    border-radius: 4px;
}

.remove-amount {
    background-color: #ff4444;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
}

.remove-amount:hover {
    background-color: #cc0000;
}

.total-section {
    margin: 15px 0;
    padding: 10px;
    background-color: #f2f2f2;
    border-radius: 4px;
    text-align: right;
}

#amount-total {
    font-size: 1.2em;
    margin-left: 10px;
}

#add-amount {
    background-color: #72B42C;
    color: white;
    margin-bottom: 15px;
}

#apply-total {
    background-color: #72B42C;
    color: white;
    width: 100%;
}



#process-all-btn {
    margin: 20px 0;
    width: 100%;
    background-color: #72B42C;
    color: white;
}

#process-all-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

@media (min-width: 768px) {
    #process-all-btn {
        width: auto;
        padding: 10px 20px;
    }
}



#loading-indicator {
    text-align: center;
    padding: 10px;
    margin: 10px 0;
    background-color: #f0f0f0;
    border-radius: 5px;
}


/* Estilos para los inputs del modal */
.amount-input {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.amount-input label {
    width: 150px;
    margin-right: 10px;
    font-weight: bold;
}

.amount-input input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #818385;
    border-radius: 4px;
}

/* Estilo para los campos dinámicos */
.dynamic-input {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.dynamic-input input[type="text"] {
    width: 150px;
    margin-right: 10px;
    padding: 8px;
    border: 1px solid #818385;
    border-radius: 4px;
}

.dynamic-input input[type="number"] {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #818385;
    border-radius: 4px;
}

.dynamic-input .remove-amount {
    background-color: #ff4444;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
}