/* Loan calculator page */

.calc-shell { padding: 56px 0 100px; overflow-x: hidden; }
.calc-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 28px; align-items: start; }
@media (max-width: 980px) { .calc-grid { grid-template-columns: minmax(0, 1fr); } }

.calc-inputs { position: sticky; top: 96px; min-width: 0; }
.calc-card { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-md); }
.calc-input-row { margin-bottom: 26px; }
.calc-input-row:last-child { margin-bottom: 0; }
.calc-input-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.calc-input-head label { font-size: .86rem; font-weight: 600; }
.calc-input-value { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--blue-600); }
.calc-amount-field { display: inline-flex; align-items: center; gap: 2px; }
.calc-amount-currency { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--blue-600); }
.calc-amount-field input {
  font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--blue-600);
  border: none; border-bottom: 2px solid transparent; background: transparent;
  width: 130px; padding: 0 0 1px; text-align: right; transition: border-color .2s var(--ease);
}
.calc-amount-field input:focus { outline: none; border-bottom-color: var(--blue-600); }
.calc-range-labels { display: flex; justify-content: space-between; font-size: .74rem; color: var(--text-400); margin-top: 6px; }

.results-stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.result-hero { background: linear-gradient(120deg, var(--navy-900), var(--navy-700)); border-radius: var(--radius-lg); padding: 34px; color: #fff; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; position: relative; overflow: hidden; }
.result-hero::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(47,107,255,.35), transparent 70%); top: -100px; right: -60px; }
.result-hero .rh-item { position: relative; z-index: 1; min-width: 0; }
.result-hero .rh-label { font-size: .74rem; color: #a9b8e8; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.result-hero .rh-value { font-family: var(--font-head); font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 700; margin-top: 6px; overflow-wrap: break-word; }
@media (max-width: 640px) { .result-hero { grid-template-columns: minmax(0, 1fr); } }

.charts-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 20px; }
@media (max-width: 760px) { .charts-row { grid-template-columns: minmax(0, 1fr); } }
.chart-card { min-width: 0; }

.chart-card { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; }
.chart-card h3 { margin-bottom: 4px; }
.chart-card .chart-sub { font-size: .82rem; color: var(--text-400); margin-bottom: 16px; }
.donut-wrap { position: relative; display: flex; align-items: center; justify-content: center; }
.donut-center { position: absolute; text-align: center; height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center .dc-value { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; }
.donut-center .dc-label { font-size: .72rem; color: var(--text-400); }
.chart-legend { display: flex; gap: 18px; justify-content: center; margin-top: 16px; }
.legend-dot { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--text-600); }
.legend-dot span { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.amort-table-card { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; margin-top: 20px; }
.amort-toggle { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.amort-table th, .amort-table td { padding: 12px 14px; font-size: .86rem; text-align: right; }
.amort-table th:first-child, .amort-table td:first-child { text-align: left; }
.amort-table thead { background: var(--surface-alt); }
.amort-table th { font-family: var(--font-head); font-size: .74rem; text-transform: uppercase; color: var(--text-400); }
.amort-table tbody tr { border-top: 1px solid var(--border); }
.amort-table tbody tr:hover { background: var(--surface-alt); }
