body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f4f7f9;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

.container {
    background-color: #ffffff;
    padding: 25px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 900px;
}

h1 {
    text-align: center;
    color: #0056b3;
    margin-bottom: 30px;
}

h2 {
    margin-top: 0;
    color: #333;
}

.container-add {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #ddd;
}

.form-add {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.form-add input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    flex-grow: 1;
    min-width: 150px;
}

#status-adicao {
    margin-top: 10px;
    font-size: 0.9em;
    font-weight: bold;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

thead th {
    background-color: #007bff;
    color: #ffffff;
    font-weight: 600;
}

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

td:nth-child(3),
td:nth-child(4) {
    font-family: 'Courier New', Courier, monospace;
}

input.parcelas-pagas {
    width: 60px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-align: center;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input.parcelas-pagas:focus {
    outline: none;
    border-color: #007bff;
}

.actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

button {
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

#btn-adicionar,
#btn-salvar {
    background-color: #28a745;
}

#btn-adicionar:hover,
#btn-salvar:hover {
    background-color: #218838;
}

#btn-salvar:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

.buttonexc,
.btn-danger {
    background-color: #d9534f;
    padding: 10px 15px;
}

.buttonexc:hover,
.btn-danger:hover {
    background-color: #c9302c;
}

#status-salvamento {
    font-weight: bold;
}

#resumo-financeiro {
    background-color: #e9ecef;
    border-left: 5px solid #007bff;
    padding: 20px;
    border-radius: 8px;
}

#resumo-financeiro p {
    font-size: 1.1rem;
    margin: 10px 0;
}

#resumo-financeiro span {
    font-weight: bold;
    font-family: 'Courier New', Courier, monospace;
}

#resumo-financeiro .fatura span {
    color: #007bff;
    font-size: 1.3rem;
}

#resumo-financeiro .restante span {
    color: #d9534f;
    font-size: 1.3rem;
}

#modal-overlay.hidden {
    display: none;
}

#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#modal-confirmacao {
    background: #ffffff;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

#modal-confirmacao h2 {
    border-bottom: none;
    color: #333;
}

.aviso-modal {
    font-size: 0.9em;
    color: #777;
    margin-top: -10px; 
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 25px;
}

.modal-actions button {
    padding: 10px 20px;
}

#btn-modal-cancelar {
    background-color: #ccc;
    color: #333;
}

#btn-modal-cancelar:hover {
    background-color: #bbb;
}