.page-container { display: flex; flex-direction: column; gap: 30px; width: 100%; max-width: 1300px; margin: 0 auto; }
#summary { text-align: center; margin-bottom: 50px; }
#downloadAnnualSummaryCsvBtn, #downloadMonthlySummaryCsvBtn { font-size: 12px; display: none; width: 100%; max-width: 280px; margin: 15px auto 5px auto; padding: 10px 15px; background-color: #6c757d; color: white; border: none; border-radius: 5px; cursor: pointer; }
.input-section, .output-section { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.calculator-container { background-color: #f3f3f3; padding: 30px; border-radius: 10px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); box-sizing: border-box; width: 100%; }
tbody{background:#FFF}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 8px; color: #555; }
.form-group input, .form-group select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 5px; box-sizing: border-box; font-size: 1em; }
.form-group input:focus, .form-group select:focus { border-color: #007bff; outline: none; box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); }
button[type="submit"], button[type="button"] { background-color: #007bff; color: white; padding: 12px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 1.1em; width: 100%; transition: background-color 0.3s ease; margin-top: 10px; }
button[type="submit"]:hover, button[type="button"]:hover { background-color: #0056b3; }
#showOverpaymentFormBtn { background-color: #dc3545; max-width: 280px; margin: 15px auto 0 auto; }
#showOverpaymentFormBtn:hover { background-color: #c82333; }
#resetToOriginalBtn.btn-secondary { background-color: #6c757d; }
#resetToOriginalBtn.btn-secondary:hover { background-color: #5a6268; }
.results-container h2, #chartContainer h2, #overpaymentSection h3 { text-align: left; color: #0056b3; margin-top: 0; margin-bottom: 20px; }
.results-container h3 { color: #333; margin-top: 20px; margin-bottom: 10px; padding-bottom: 5px; }
.results-container p { margin: 8px 0; line-height: 1.6; }
.results-container strong { color: #000; }
.results-container hr { border: 0; height: 1px; background-color: #e0e0e0; margin: 25px 0; }
.error-messages { background-color: #f8d7da; color: #721c24; padding: 15px; border: 1px solid #f5c6cb; border-radius: 5px; margin-top: 20px; }
.error-messages p { margin: 5px 0; }
#chartContainer { position: relative; width: 100%; height: 450px; box-sizing: border-box;background:#FFF}
#amortisationChart { display: block; max-width: 100%; max-height: 100%; }
#overpaymentSection.calculator-container { background-color: #f9f9f9; border: 1px solid #e0e0e0; }
@media (min-width: 992px) { .page-container { flex-direction: row; align-items: flex-start; } .input-section { flex: 0 0 40%; } .output-section { flex: 1 1 60%; } #chartContainer { min-height: 400px; } }
@media (min-width: 1200px) { .input-section { flex: 0 0 35%; } .output-section { flex: 1 1 65%; } }
#annualSummaryTableContainer { margin-top: 30px; overflow-y: scroll; }
#annualSummaryTableContainer h2 { text-align: left; color: #0056b3; margin-top: 0; margin-bottom: 20px; }
#annualSummaryTable { width: 100%; border-collapse: collapse; margin-top: 15px; font-size: 0.9em; }
#annualSummaryTable th, #annualSummaryTable td { border: 1px solid #ddd; padding: 8px 10px; text-align: left; vertical-align: top; }
#annualSummaryTable th { background-color: #e9ecef; font-weight: bold; color: #333; }
#annualSummaryTable th:nth-child(1), #annualSummaryTable td:nth-child(1) { text-align: center; width: 8%; }
#annualSummaryTable th:nth-child(2), #annualSummaryTable td:nth-child(2) { text-align: center; width: 12%; }
#annualSummaryTable th:nth-child(3), #annualSummaryTable td:nth-child(3), #annualSummaryTable th:nth-child(4), #annualSummaryTable td:nth-child(4), #annualSummaryTable th:nth-child(5), #annualSummaryTable td:nth-child(5), #annualSummaryTable td:nth-child(5) { text-align: right; }
#annualSummaryTable td:nth-child(5) { width: 25%; }
#overpaymentListContainer { background-color: #e9ecef; padding: 20px; border-radius: 8px; border: 1px solid #ced4da; }
#overpaymentListContainer h4 { margin-top: 0; margin-bottom: 15px; color: #0056b3; font-size: 1.2em; }
.overpayment-list-item { background-color: #fff; padding: 12px 15px; margin-bottom: 10px; border: 1px solid #ddd; border-radius: 5px; display: flex; justify-content: space-between; align-items: center; font-size: 0.95em; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.overpayment-list-item p { margin: 0; flex-grow: 1; line-height: 1.5; }
.overpayment-list-item button.remove-overpayment-btn { background-color: #ffc107; color: #212529; padding: 6px 12px; font-size: 0.85em; width: auto; margin-left: 15px; border: none; border-radius: 4px; cursor: pointer; transition: background-color 0.2s ease; }
.overpayment-list-item button.remove-overpayment-btn:hover { background-color: #e0a800; }
@media (max-width: 1200px) { #footer-inner { width: calc(100% - 20px); margin: 0 10px 20px 10px; } #header-inner { width: 100%; } }
.table-wrapper { width: 100%; overflow-x: auto; margin-top: 20px; }
.responsive-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.responsive-table th, .responsive-table td { text-align: left; padding: 12px 15px; border-bottom: 1px solid #ddd; white-space: nowrap; }
.responsive-table th { background-color: #f8f8f8; font-weight: bold; }
@media screen and (max-width: 600px) {
  .responsive-table { display: block; overflow-x: auto; }
}
