/* =========================================================
   TrustFin NBFC — Shared Stylesheet
   Theme: Blue & Gold
   ========================================================= */

:root {
  --navy-900: #06213f;
  --navy-800: #0b3d67;
  --navy-700: #0f4d82;
  --blue-600: #1565a8;
  --blue-100: #e8f1fa;
  --gold-500: #c9a227;
  --gold-400: #d9b84a;
  --gold-100: #faf3dd;
  --ink-900: #1a2330;
  --ink-600: #4c5a6b;
  --ink-400: #7c8a9a;
  --line: #e2e8ef;
  --bg: #f6f8fb;
  --white: #ffffff;
  --success: #1c8a4b;
  --danger: #c0392b;
  --radius: 10px;
  --shadow: 0 4px 18px rgba(11, 61, 103, 0.09);
  --shadow-lg: 0 12px 32px rgba(11, 61, 103, 0.14);
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink-900);
  background: var(--bg);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Top utility bar ---------- */
.topbar {
  background: var(--navy-900);
  color: #cfe0f0;
  font-size: 13px;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  padding-bottom: 6px;
  flex-wrap: wrap;
  gap: 6px;
}
.topbar a { color: #cfe0f0; }
.topbar span { margin-right: 18px; }
.topbar .rbi-note { color: var(--gold-400); font-weight: 600; }

/* ---------- Header / Nav ---------- */
header.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  color: var(--navy-800);
}
.brand .mark {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--navy-800), var(--blue-600));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-400);
  font-weight: 900;
  font-size: 18px;
}
.brand .sub {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-500);
  letter-spacing: 0.08em;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
}
nav.main-nav a {
  color: var(--ink-900);
  font-weight: 600;
  font-size: 15px;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--navy-800);
  border-bottom-color: var(--gold-500);
  text-decoration: none;
}

.nav-actions { display: flex; align-items: center; gap: 12px; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  color: var(--navy-800);
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: 2px solid transparent;
  text-align: center;
  transition: all 0.15s ease;
}
.btn-primary {
  background: var(--gold-500);
  color: var(--navy-900);
}
.btn-primary:hover { background: var(--gold-400); text-decoration: none; }
.btn-outline {
  background: transparent;
  border-color: var(--navy-800);
  color: var(--navy-800);
}
.btn-outline:hover { background: var(--navy-800); color: var(--white); text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); text-decoration: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(1200px 500px at 80% -10%, rgba(201,162,39,0.25), transparent),
              linear-gradient(120deg, var(--navy-900), var(--navy-800) 60%, var(--blue-600));
  color: var(--white);
  padding: 72px 0 84px;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.hero h1 { font-size: 42px; line-height: 1.2; margin: 0 0 16px; }
.hero .accent { color: var(--gold-400); }
.hero p.lead { font-size: 17px; color: #d8e6f4; max-width: 520px; margin-bottom: 28px; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(6px);
}
.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}
.hero-stats .stat-num { font-size: 26px; font-weight: 800; color: var(--gold-400); }
.hero-stats .stat-label { font-size: 12.5px; color: #cfe0f0; }

/* ---------- Section basics ---------- */
section { padding: 64px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--gold-500);
}
.section-head h2 { font-size: 30px; margin: 8px 0 10px; color: var(--navy-900); }
.section-head p { color: var(--ink-600); }
.bg-white { background: var(--white); }
.bg-navy { background: var(--navy-900); color: var(--white); }
.bg-navy .section-head p { color: #cfe0f0; }
.bg-navy .section-head h2 { color: var(--white); }

/* ---------- Grid / cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.card .icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: var(--blue-100);
  color: var(--navy-800);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800;
  margin-bottom: 14px;
}
.card h3 { margin: 0 0 8px; color: var(--navy-900); font-size: 18px; }
.card p { color: var(--ink-600); font-size: 14.5px; margin: 0; }

/* Product card */
.product-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.product-card .head {
  background: linear-gradient(120deg, var(--navy-800), var(--blue-600));
  color: var(--white);
  padding: 20px 22px;
}
.product-card .head h3 { margin: 0 0 4px; font-size: 19px; }
.product-card .head span { font-size: 13px; color: var(--gold-400); font-weight: 700; }
.product-card .body { padding: 20px 22px; flex: 1; }
.product-card ul { padding-left: 18px; margin: 12px 0; color: var(--ink-600); font-size: 14px; }
.product-card .rate {
  font-size: 24px; font-weight: 800; color: var(--navy-800);
}
.product-card .rate small { font-size: 13px; font-weight: 600; color: var(--ink-400); }
.product-card .foot { padding: 16px 22px; border-top: 1px solid var(--line); }

/* Badges */
.badge {
  display: inline-block;
  background: var(--gold-100);
  color: var(--gold-500);
  border: 1px solid var(--gold-400);
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

/* ---------- Forms ---------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 6px;
}
.field { margin-bottom: 18px; }
.field .hint { font-size: 12px; color: var(--ink-400); margin-top: 4px; }
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-size: 14.5px;
  font-family: inherit;
  background: var(--white);
  color: var(--ink-900);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px var(--blue-100);
}
.field.error input, .field.error select { border-color: var(--danger); }
.field .error-msg { display: none; color: var(--danger); font-size: 12.5px; margin-top: 4px; }
.field.error .error-msg { display: block; }

.file-drop {
  border: 2px dashed var(--line);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  background: var(--bg);
  cursor: pointer;
  font-size: 13.5px;
  color: var(--ink-600);
}
.file-drop:hover { border-color: var(--blue-600); }
.file-drop .fname { margin-top: 8px; font-weight: 700; color: var(--navy-800); }

fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 24px; }
legend { padding: 0 10px; font-weight: 800; color: var(--navy-800); font-size: 14.5px; }

.alert {
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}
.alert.show { display: block; }
.alert-success { background: #e7f7ee; color: var(--success); border: 1px solid #b7e6c9; }
.alert-error { background: #fbeae7; color: var(--danger); border: 1px solid #f3c3ba; }
.alert-info { background: var(--blue-100); color: var(--navy-800); border: 1px solid #bcdcf3; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; }
thead th {
  background: var(--navy-900);
  color: var(--white);
  text-align: left;
  padding: 12px 14px;
  font-size: 13px;
  letter-spacing: 0.03em;
}
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-900); }
tbody tr:nth-child(even) { background: #fafcfe; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- EMI calculator ---------- */
.emi-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.slider-row { margin-bottom: 22px; }
.slider-row .top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.slider-row .top .val { font-weight: 800; color: var(--navy-800); font-size: 16px; }
input[type="range"] {
  width: 100%;
  accent-color: var(--gold-500);
}
.result-card {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  color: var(--white);
  border-radius: var(--radius);
  padding: 28px;
}
.result-card .emi-amount { font-size: 40px; font-weight: 900; color: var(--gold-400); }
.result-card .row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.15); font-size: 14.5px; }
.result-card .row:last-child { border-bottom: none; }

/* ---------- Branch cards ---------- */
.branch-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.branch-card h3 { margin: 0 0 6px; color: var(--navy-900); }
.branch-card .tag { font-size: 12px; color: var(--gold-500); font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.branch-card p { margin: 4px 0; font-size: 14px; color: var(--ink-600); }
.branch-filter { display: flex; gap: 12px; margin-bottom: 30px; align-items: center; flex-wrap: wrap; }
.branch-filter select { max-width: 260px; }

/* ---------- Dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: 260px 1fr; gap: 28px; }
.dash-side {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  height: fit-content;
}
.dash-side .user { text-align: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.dash-side .avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-800), var(--blue-600));
  color: var(--gold-400); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 22px; margin: 0 auto 10px;
}
.dash-side ul { list-style: none; padding: 0; margin: 0; }
.dash-side ul li a {
  display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink-900); font-weight: 600; font-size: 14.5px;
}
.dash-side ul li a.active, .dash-side ul li a:hover { background: var(--blue-100); color: var(--navy-800); text-decoration: none; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 28px; }
.stat-box {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.stat-box .label { font-size: 12.5px; color: var(--ink-400); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-box .value { font-size: 26px; font-weight: 800; color: var(--navy-800); margin-top: 6px; }
.stat-box .value.gold { color: var(--gold-500); }

.progress-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 8px; }
.progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-500), var(--gold-400)); }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--navy-900);
  color: #b9cadd;
  padding: 56px 0 24px;
  margin-top: 40px;
}
footer .grid-4 { margin-bottom: 36px; }
footer h4 { color: var(--white); font-size: 15px; margin: 0 0 14px; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin-bottom: 9px; font-size: 13.5px; }
footer a { color: #b9cadd; }
footer a:hover { color: var(--gold-400); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: #8aa0b8;
}
.disclaimer-box {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 16px 18px;
  font-size: 12px;
  color: #9db3c9;
  margin-bottom: 24px;
}

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.small { font-size: 13px; }
.muted { color: var(--ink-600); }
.divider { height: 1px; background: var(--line); margin: 28px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; }
  .emi-layout { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  nav.main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    display: none;
    padding: 12px 0;
  }
  nav.main-nav.open { display: block; }
  nav.main-nav ul { flex-direction: column; gap: 0; padding: 0 24px; }
  nav.main-nav li { border-bottom: 1px solid var(--line); }
  nav.main-nav a { display: block; padding: 13px 0; }
  .menu-toggle { display: block; }
  .nav-actions .btn { display: none; }
  .hero h1 { font-size: 30px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
}
