* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #f0f2f5;
  color: #1a1a2e;
  padding: 30px 16px 60px 16px;
}

.page {
  max-width: 520px;
  margin: 0 auto;
}

.header {
  margin-bottom: 20px;
}

.header h1 {
  font-size: 26px;
  font-weight: 700;
  color: #111827;
}

.header p {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}

.loan-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tab {
  padding: 6px 14px;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  background: white;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

.tab:hover {
  background: #f9fafb;
}

.tab.active {
  background: white;
  border-color: #3b82f6;
  color: #3b82f6;
}

.card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.input-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.input-row label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.amount-box {
  display: flex;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 5px 10px;
  gap: 4px;
  background: #f9fafb;
}

.amount-box.small {
  width: 90px;
}

.amount-box input {
  border: none;
  background: transparent;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #111827;
  width: 100px;
  text-align: right;
  outline: none;
}

.amount-box.small input {
  width: 50px;
}

.rupee, .percent {
  font-size: 13px;
  color: #6b7280;
}

.tenure-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tenure-box input {
  width: 48px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  text-align: center;
  outline: none;
  background: #f9fafb;
}

.unit-btn {
  padding: 5px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: white;
  font-size: 12px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  color: #6b7280;
}

.unit-btn.active {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #3b82f6;
}

input[type="range"] {
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, #3b82f6 0%, #3b82f6 var(--pct, 0%), #e5e7eb var(--pct, 0%), #e5e7eb 100%);
  appearance: none;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 0 0 1px #3b82f6;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
  margin-bottom: 4px;
}

.divider {
  height: 1px;
  background: #f3f4f6;
  margin: 14px 0;
}

.results-card {
  background: #f0f4ff;
}

.results-title {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 16px;
}

.emi-section {
  text-align: center;
  margin-bottom: 16px;
}

.emi-label {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}

.emi-value {
  font-size: 36px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -1px;
}

.chart-section {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.breakdown {
  margin-top: 4px;
}

.breakdown-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #374151;
  padding: 6px 0;
}

.breakdown-row .amount-val {
  margin-left: auto;
  font-weight: 500;
}

.breakdown-row.total-row {
  font-weight: 500;
  color: #111827;
}

.breakdown-row.total-row .bold {
  font-weight: 700;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot.blue {
  background: #3b82f6;
}

.dot.gray {
  background: #9ca3af;
}