:root {
  --navy: #1f3864;
  --navy-light: #2e4a7d;
  --gold: #c9971f;
  --input-bg: #fff2cc;
  --input-border: #e8d28a;
  --text: #1a1a1a;
  --muted: #595959;
  --card-bg: #ffffff;
  --page-bg: #f3f5fa;
  --total-bg: #eaf1fb;
  --danger: #a0522d;
  --border: #dfe3ea;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Noto Sans Bengali", "SolaimanLipi", "Hind Siliguri", system-ui, sans-serif;
  background: var(--page-bg);
  color: var(--text);
  line-height: 1.55;
}

.page { max-width: 920px; margin: 0 auto; padding: 24px 16px 60px; }

.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  margin-bottom: 20px;
}
.hero h1 { margin: 0 0 8px; font-size: 1.5rem; }
.hero .subtitle { margin: 0; font-size: 0.9rem; color: #d9e1f2; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(20, 30, 60, 0.06);
}
.card h2 { color: var(--navy); font-size: 1.15rem; margin: 0 0 16px; border-bottom: 2px solid #dce6f1; padding-bottom: 8px; }
.card h3 { color: var(--navy); font-size: 1rem; margin: 22px 0 10px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 18px; }

label { display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; font-weight: 600; color: #333; }
label.checkbox-row { flex-direction: row; align-items: center; font-weight: 500; gap: 8px; }

input[type="number"], input[type="text"], select {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 0.95rem;
  color: #1f4e78;
  font-weight: 500;
  width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--navy); outline-offset: 1px; }

.field-error { color: #b02a37; font-size: 0.78rem; font-weight: 600; }

.hint { color: var(--muted); font-size: 0.82rem; margin: 4px 0 14px; }

.loan-table, .result-table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.loan-table th {
  background: var(--navy); color: #fff; text-align: left; padding: 10px; font-size: 0.85rem;
}
.loan-table td { padding: 10px; border-bottom: 1px solid var(--border); font-size: 0.9rem; vertical-align: middle; }
.loan-table input[type="number"] { max-width: 160px; }
.muted { color: var(--muted); font-style: italic; font-size: 0.85rem; }

.result-table td { padding: 8px 6px; border-bottom: 1px solid #eef0f4; font-size: 0.92rem; }
.result-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.result-table tr.total { font-weight: 700; background: var(--total-bg); }
.result-table tr.final { font-weight: 800; background: var(--gold); color: var(--navy); font-size: 1.05rem; }
.result-table tr.final td { padding: 12px 6px; }

.badge {
  display: inline-block; background: var(--gold); color: #1f3864; font-size: 0.68rem;
  font-weight: 700; padding: 1px 7px; border-radius: 20px; margin-inline-start: 6px; vertical-align: middle;
}

.actions { display: flex; justify-content: center; margin: 22px 0; }
.btn-primary {
  background: var(--navy); color: #fff; border: none; border-radius: 8px;
  padding: 13px 42px; font-size: 1.02rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 2px 6px rgba(31, 56, 100, 0.3);
}
.btn-primary:hover { background: var(--navy-light); }
.btn-primary:disabled { opacity: .6; cursor: progress; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-weight: 600; }
.alert-error { background: #fdecea; color: #b02a37; border: 1px solid #f3c3bd; }

.disclaimer { color: var(--muted); font-size: 0.8rem; margin-top: 14px; }

.site-footer { text-align: center; color: var(--muted); font-size: 0.8rem; margin-top: 28px; }

.error-page { max-width: 520px; margin: 80px auto; text-align: center; padding: 0 16px; }
.error-page h1 { color: var(--navy); }
.error-page a { color: var(--gold); font-weight: 700; }

/* Honeypot — off-screen, not display:none, so it still catches naive bots
   that skip hidden fields but not ones that just look for CSS visibility. */
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; width: 0; overflow: hidden; }

@media (max-width: 640px) {
  .hero h1 { font-size: 1.2rem; }
  .card { padding: 16px; }
}
