/* HDFC Home Loan — lookalike styling (personal loan tracker for Bhagirath Basnet) */
:root {
  --blue: #004c8f;
  --blue-dark: #00376b;
  --blue-darker: #002a52;
  --red: #ed1c24;
  --yellow: #f6c945;
  --ink: #2b2b2b;
  --muted: #6b7684;
  --line: #e2e7ee;
  --bg: #f4f6f9;
  --card: #ffffff;
  --green: #1a8754;
  --radius: 10px;
  --shadow: 0 2px 14px rgba(0, 32, 70, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
/* Logo must never be squeezed by flex layouts: keep intrinsic aspect ratio */
.brand, .auth-topbar a { flex-shrink: 0; display: inline-flex; }
.brand img, .auth-topbar img {
  width: auto; max-width: none; flex-shrink: 0; object-fit: contain; aspect-ratio: auto;
}

/* ---------- Top utility bar ---------- */
.utilbar {
  background: #eceef1;
  color: #43515f;
  font-size: 13px;
  border-bottom: 1px solid #dfe3e8;
}
.utilbar .wrap {
  max-width: 1180px; margin: 0 auto; padding: 7px 20px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
.utilbar .spacer { flex: 1; }
.utilbar .util-link { color: #43515f; font-weight: 600; }
.utilbar .pill { display: inline-flex; align-items: center; gap: 7px; }
.utilbar .dot { color: var(--blue); }

/* ---------- Main nav ---------- */
.nav {
  background: var(--blue);
  color: #fff;
}
.nav .wrap {
  max-width: 1180px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 46px; width: auto; background: #fff; padding: 4px 6px; border-radius: 4px; }
.nav .menu { display: flex; gap: 26px; align-items: center; margin-left: 10px; }
.nav .menu a { color: #fff; font-weight: 600; font-size: 15px; }
.nav .menu a:hover { text-decoration: none; color: #ffd9db; }
.nav .spacer { flex: 1; }
.nav .search { color: #fff; display: inline-flex; gap: 7px; align-items: center; font-weight: 600; }
.btn-login {
  border: 1.5px solid #ffffff; color: #fff; background: transparent;
  padding: 9px 20px; border-radius: 30px; font-weight: 700; cursor: pointer;
  display: inline-flex; gap: 8px; align-items: center; font-size: 15px;
}
.btn-login:hover { background: #ffffff; color: var(--blue); text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; border: none; cursor: pointer;
  padding: 12px 26px; border-radius: 6px; font-weight: 700; font-size: 15px;
  transition: filter .15s ease;
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-red { background: var(--red); color: #fff; }
.btn-ghost { background: #fff; color: var(--blue); border: 1.5px solid var(--blue); }
.btn-block { width: 100%; text-align: center; }

/* ---------- Hero (landing) ---------- */
.hero-row { max-width: 1180px; margin: 24px auto; padding: 0 20px; display: grid; grid-template-columns: 1fr 320px; gap: 22px; }
.hero {
  background: linear-gradient(120deg, var(--yellow) 0%, #f3b73f 60%, #efa92c 100%);
  border-radius: 12px; padding: 40px 44px; color: var(--blue-darker);
  position: relative; overflow: hidden; min-height: 300px;
}
.hero h1 { font-size: 30px; margin: 0 0 6px; color: var(--blue); }
.hero .rate-chip {
  background: var(--blue); color: #fff; display: inline-flex; align-items: baseline; gap: 8px;
  padding: 14px 22px; border-radius: 8px; margin: 18px 0; font-weight: 800;
}
.hero .rate-chip .big { font-size: 34px; color: var(--yellow); }
.hero .rate-chip .small { font-size: 16px; }
.hero p.fine { font-size: 11px; opacity: .8; max-width: 540px; margin-top: 20px; }
.hero .house {
  position: absolute; right: 34px; bottom: 0; width: 230px; opacity: .95;
  font-size: 150px; line-height: 1;
}

.quick-apply {
  background: #eef3f9; border: 1px solid var(--line); border-radius: 12px; padding: 22px;
}
.quick-apply h3 { margin: 0 0 16px; color: var(--ink); font-size: 20px; }
.quick-apply select, .quick-apply input {
  width: 100%; padding: 12px; border: 1px solid #cdd6e0; border-radius: 6px; margin-bottom: 12px;
  background: #fff; font-size: 14px;
}

/* ---------- Generic sections ---------- */
.section { max-width: 1180px; margin: 36px auto; padding: 0 20px; }
.section h2 { color: var(--blue); font-size: 24px; margin: 0 0 6px; }
.section .lead { color: var(--muted); margin: 0 0 22px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.feature .ic { font-size: 30px; }
.feature h4 { margin: 10px 0 6px; color: var(--ink); }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

.strip { background: var(--blue); color: #fff; }
.strip .wrap { max-width: 1180px; margin: 0 auto; padding: 30px 20px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.strip h3 { margin: 0; font-size: 22px; }
.strip .spacer { flex: 1; }

/* ---------- Footer ---------- */
.footer { background: #0e1b2b; color: #b9c4d1; margin-top: 46px; }
.footer .wrap { max-width: 1180px; margin: 0 auto; padding: 34px 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.footer h5 { color: #fff; margin: 0 0 12px; font-size: 15px; }
.footer a { color: #b9c4d1; font-size: 13px; display: block; margin-bottom: 7px; }
.footer a:hover { color: #fff; }
.footer .legal { grid-column: 1 / -1; border-top: 1px solid #22344a; padding-top: 16px; font-size: 12px; color: #7f8ea0; }

/* ---------- Login page ---------- */
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 68px); }
.auth-left {
  background: var(--blue); color: #fff; padding: 60px 64px; position: relative; overflow: hidden;
}
.auth-left .tags { display: flex; gap: 18px; font-weight: 600; margin-bottom: 26px; opacity: .9; }
.auth-left h2 { font-size: 34px; line-height: 1.25; max-width: 420px; }
.auth-left .couch { font-size: 150px; position: absolute; bottom: 10px; left: 50px; opacity: .25; }
.auth-right { display: flex; align-items: center; justify-content: center; padding: 40px; background: #f7f9fc; }
.auth-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  width: 100%; max-width: 430px; padding: 34px 32px;
}
.auth-card h3 { text-align: center; margin: 0 0 22px; font-size: 22px; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.auth-tabs button {
  flex: 1; background: none; border: none; padding: 12px; cursor: pointer; font-weight: 600;
  color: var(--muted); border-bottom: 2px solid transparent;
}
.auth-tabs button.active { color: var(--blue); border-bottom-color: var(--blue); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.field label .req { color: var(--red); }
.field input {
  width: 100%; padding: 12px 14px; border: 1px solid #cdd6e0; border-radius: 8px; font-size: 15px;
}
.field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,76,143,.12); }
.auth-row { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 20px; }
.auth-foot { text-align: center; font-size: 14px; margin-top: 22px; color: var(--muted); }
.auth-foot .big { display: block; margin-top: 10px; color: var(--ink); }
.auth-topbar { background: var(--blue-darker); padding: 12px 20px; }
.auth-topbar img { height: 40px; background: #fff; padding: 4px 6px; border-radius: 4px; }
.err { background: #fdecec; color: #b3261e; border: 1px solid #f5c2c0; padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; display: none; }
.err.show { display: block; }

/* ---------- Account / dashboard ---------- */
.app-nav { background: var(--blue); color: #fff; }
.app-nav .wrap { max-width: 1200px; margin: 0 auto; padding: 10px 22px; display: flex; align-items: center; gap: 18px; }
.app-nav .who { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 14px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--yellow); color: var(--blue-darker); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.btn-logout { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.4); padding: 7px 16px; border-radius: 20px; cursor: pointer; font-weight: 600; }
.btn-logout:hover { background: #fff; color: var(--blue); }

.app-shell { max-width: 1200px; margin: 22px auto; padding: 0 22px; }
.welcome { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.welcome h1 { font-size: 24px; margin: 0; color: var(--ink); }
.welcome .sub { color: var(--muted); }

.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 24px; flex-wrap: wrap; }
.tabs button {
  background: none; border: none; padding: 13px 20px; cursor: pointer; font-weight: 700; font-size: 15px;
  color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tabs button.active { color: var(--blue); border-bottom-color: var(--red); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.loan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.loan-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  overflow: hidden;
}
.loan-card .head { background: var(--blue); color: #fff; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; }
.loan-card .head .type { font-weight: 700; font-size: 16px; }
.loan-card .head .acc { font-size: 13px; opacity: .9; }
.loan-card .body { padding: 20px; }
.kv { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 700; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge.active { background: #e6f5ec; color: var(--green); }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow);
}
.stat .label { color: var(--muted); font-size: 13px; }
.stat .num { font-size: 24px; font-weight: 800; color: var(--blue); margin-top: 6px; }
.stat .num.red { color: var(--red); }
.stat .num.green { color: var(--green); }

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  padding: 22px; margin-bottom: 22px;
}
.panel h3 { margin: 0 0 4px; color: var(--ink); }
.panel .psub { color: var(--muted); margin: 0 0 18px; font-size: 14px; }

.loan-switch { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.loan-switch button {
  border: 1px solid var(--line); background: #fff; padding: 9px 16px; border-radius: 8px; cursor: pointer;
  font-weight: 600; color: var(--muted);
}
.loan-switch button.active { background: var(--blue); color: #fff; border-color: var(--blue); }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 11px 12px; text-align: right; border-bottom: 1px solid var(--line); }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data th { background: #f1f5fa; color: var(--blue-dark); font-weight: 700; position: sticky; top: 0; }
table.data tbody tr:hover { background: #f8fbff; }
.tag-paid { color: var(--green); font-weight: 700; }
.tag-due { color: var(--red); font-weight: 700; }
.tbl-scroll { max-height: 460px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }

.progress { background: #eef2f7; border-radius: 20px; height: 12px; overflow: hidden; margin: 10px 0; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), #3a7bbf); }

.inq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.bignum { font-size: 30px; font-weight: 800; color: var(--blue); }
.bignum.red { color: var(--red); }

.note { font-size: 12px; color: var(--muted); margin-top: 8px; }

@media (max-width: 920px) {
  .nav .menu, .utilbar .pill span.hide { display: none; }
  .hero-row, .auth-wrap, .loan-grid, .inq-grid { grid-template-columns: 1fr; }
  .cards, .footer .wrap { grid-template-columns: 1fr 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .auth-left { display: none; }
  .hero .house { display: none; }
}
@media (max-width: 560px) {
  .cards, .footer .wrap, .stat-row { grid-template-columns: 1fr; }
  .nav .wrap { gap: 12px; padding: 10px 14px; }
  .nav .search { display: none; }
  .btn-login { padding: 8px 14px; font-size: 14px; }
  .app-nav .wrap { gap: 10px; padding: 10px 14px; flex-wrap: wrap; }
  .app-nav .who { gap: 10px; }
  .app-nav .who .name-sub { display: none; }
  .utilbar .wrap { padding: 7px 14px; gap: 8px 14px; font-size: 12px; }
  .hero { padding: 26px 20px; }
  .hero h1 { font-size: 24px; }
  .tabs button { padding: 11px 12px; font-size: 14px; }
}
