body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0; padding: 0; background-color: #f4f5f7; color: #333;
}
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    background: white; padding: 15px 40px; box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.nav-brand { font-size: 1.5em; font-weight: 800; color: #ff8c00; }
.nav-links a { margin-left: 20px; text-decoration: none; color: #555; font-weight: 500; }
.nav-links a:hover { color: #ff8c00; }
.hero { text-align: center; padding: 40px 20px; background: #fff; border-bottom: 1px solid #ddd; }
.hero h1 { margin: 0 0 10px; font-size: 2.2em; color: #222; }
.hero p { color: #666; font-size: 1.1em; }
.container { max-width: 1100px; margin: 30px auto; padding: 20px; }
.calculator-wrapper {
    display: flex; flex-wrap: wrap; background: white;
    border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden; border: 1px solid #ddd;
}
.calculator-inputs {
    flex: 1 1 500px; padding: 30px; border-right: 1px solid #ddd; background: #fdfdfd;
}
.tabs { display: flex; margin-bottom: 25px; border-bottom: 1px solid #ddd; }
.tab {
    padding: 10px 20px; border: none; background: #eee; cursor: pointer;
    font-weight: bold; color: #666; margin-right: 5px; border-radius: 5px 5px 0 0;
}
.tab.active { background: white; color: #333; border: 1px solid #ddd; border-bottom: 2px solid white; margin-bottom: -1px; }
.input-group { margin-bottom: 30px; }
.input-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.input-header label { font-weight: 600; font-size: 1.1em; color: #444; }
.input-field { display: flex; align-items: center; background: #fff; border: 1px solid #ccc; border-radius: 4px; overflow: hidden; }
.input-field input { border: none; padding: 8px; font-size: 1em; text-align: right; width: 120px; outline: none; }
.input-field span { padding: 8px 12px; background: #eee; color: #555; border-left: 1px solid #ccc; border-right: 1px solid #ccc; }
.toggle-group { display: flex; border-left: 1px solid #ccc; }
.toggle-group button { border: none; padding: 8px 12px; background: #eee; cursor: pointer; color: #666; font-weight: bold; outline: none;}
.toggle-group button.active { background: #ddd; color: #333; }
input[type=range] {
    -webkit-appearance: none; width: 100%; height: 6px; background: #ddd; border-radius: 3px; outline: none;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%;
    background: #ff8c00; cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.slider-labels { display: flex; justify-content: space-between; font-size: 0.8em; color: #888; margin-top: 5px; }
.calculator-results { flex: 1 1 350px; padding: 30px; display: flex; flex-direction: column; align-items: center; }
.summary-cards { width: 100%; text-align: center; }
.card { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px dashed #ccc; }
.card h4 { margin: 0 0 5px; color: #666; font-weight: normal; }
.card h2 { margin: 0; font-size: 1.8em; color: #333; }
.chart-container { width: 100%; max-width: 300px; text-align: center; margin-top: 20px; }
.trajectory-section {
    background: white; padding: 30px; border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); margin-top: 30px; border: 1px solid #ddd;
}
.bar-chart-container { width: 100%; height: 400px; }
footer { text-align: center; padding: 30px; color: #777; border-top: 1px solid #ddd; margin-top: 40px; }

/* Table Styles */
.amortization-table {
    width: 100%; border-collapse: collapse; text-align: right;
}
.amortization-table th, .amortization-table td {
    padding: 12px 10px; border-bottom: 1px solid #ddd;
}
.amortization-table th {
    background: #f4f5f7; color: #555; text-align: right;
}
.amortization-table th:first-child, .amortization-table td:first-child {
    text-align: left;
}
.yearly-row { cursor: pointer; background: #fff; transition: background 0.2s; }
.yearly-row:hover { background: #fdfdfd; }
.yearly-row td { font-weight: bold; color: #333; }
.toggle-year span.indicator { display: inline-block; width: 15px; text-align: center; color: #ff8c00; }
.monthly-row td { padding: 0 !important; background: #fafafa; }
.month-table { width: 100%; border-collapse: collapse; }
.month-table td { padding: 8px 10px; border-bottom: 1px solid #eee; color: #666; font-size: 0.9em; text-align: right; }
.month-table td:first-child { text-align: left; padding-left: 30px; font-weight: bold; }
.month-table tr:last-child td { border-bottom: none; }

/* Buttons */
.action-buttons {
    display: flex; gap: 15px; justify-content: center; margin-top: 30px;
}
.btn-action {
    padding: 12px 20px; background: #007aff; color: white; border-radius: 6px;
    text-decoration: none; font-weight: 600; display: flex; align-items: center; gap: 8px;
}
.btn-action:hover { background: #005bb5; }
