/* style.css – fresh modern theme with auto-update */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background: #eef5ff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 14px 40px;
  background: linear-gradient(145deg, #e6edf7 0%, #d9e4f0 100%);
}

.app-container {
  max-width: 460px;
  width: 100%;
  margin: 0 auto;
}

.app-title {
  font-size: 2rem;
  font-weight: 700;
  color: #0b1e33;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
  padding-left: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0b2b4a, #1a4a7a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 32px;
  padding: 24px 20px;
  box-shadow: 0 12px 30px rgba(0, 20, 40, 0.08), 0 2px 8px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.6);
  margin-bottom: 20px;
  transition: all 0.2s ease;
}

.input-panel {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

.input-group {
  margin-bottom: 18px;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a3a5c;
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}

.input-group input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  border: 2px solid #dce5f0;
  border-radius: 20px;
  background: #f8fcff;
  transition: border 0.15s, box-shadow 0.15s, background 0.15s;
  color: #0a1e32;
  font-weight: 500;
  outline: none;
}

.input-group input:focus {
  border-color: #2d6bb8;
  box-shadow: 0 0 0 4px rgba(45, 107, 184, 0.12);
  background: #ffffff;
}

.input-group input::placeholder {
  color: #9aafc9;
  font-weight: 400;
}

/* EMI read-only display */
.emi-display {
  margin-top: 4px;
}

.emi-readonly {
  background: #eaf2fd;
  border: 2px solid #c5d8f0;
  border-radius: 20px;
  padding: 14px 16px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0b2b4a;
  letter-spacing: 0.3px;
  text-align: center;
  cursor: default;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}

.emi-readonly:active {
  background: #dce8fa;
}

/* results panel */
.results-panel {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

.results-panel h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0b2b4a;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 10px;
  margin-bottom: 20px;
}

.result-item {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(4px);
  border-radius: 18px;
  padding: 14px 8px;
  text-align: center;
  border: 1px solid rgba(200, 215, 235, 0.5);
  transition: background 0.15s;
}

.result-item .label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #4a6a8a;
  margin-bottom: 4px;
  font-weight: 600;
}

.result-item .value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0a1e32;
  word-break: break-word;
}

.extra-details {
  background: rgba(240, 247, 255, 0.7);
  backdrop-filter: blur(4px);
  border-radius: 20px;
  padding: 14px 16px;
  margin: 16px 0 12px;
  border: 1px solid rgba(200, 218, 240, 0.5);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(190, 210, 235, 0.4);
  font-size: 0.9rem;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row span:first-child {
  color: #3d5f7f;
  font-weight: 500;
}

.detail-row span:last-child {
  font-weight: 700;
  color: #0a1e32;
}

.amortization-note {
  margin-top: 14px;
  font-size: 0.78rem;
  color: #3f6184;
  background: rgba(220, 235, 255, 0.6);
  backdrop-filter: blur(4px);
  padding: 12px 14px;
  border-radius: 40px;
  text-align: center;
  border: 1px solid rgba(180, 205, 235, 0.4);
  font-weight: 500;
}

.footer {
  text-align: center;
  font-size: 0.7rem;
  color: #5a7a9a;
  margin-top: 10px;
  padding: 12px 0 4px;
  border-top: 1px solid rgba(180, 200, 225, 0.3);
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* responsive */
@media (max-width: 420px) {
  .result-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .app-title {
    font-size: 1.7rem;
  }
  .card {
    padding: 20px 16px;
  }
  .emi-readonly {
    font-size: 1.1rem;
    padding: 12px 14px;
  }
}