/* =====================================================================
   Microfinance platform – design system
   Navy (trust) · Emerald (growth) · White · Light grey
   ===================================================================== */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../vendor/inter/inter-latin-wght-normal.woff2") format("woff2");
}

:root {
  --mf-navy: #0b2545;
  --mf-navy-2: #13315c;
  --mf-navy-3: #1d4477;
  --mf-emerald: #0e9f6e;
  --mf-emerald-dark: #057a55;
  --mf-emerald-soft: #e6f6ef;
  --mf-grey: #f4f6f9;
  --mf-grey-2: #e8ecf2;
  --mf-text: #1f2a37;
  --mf-muted: #5b6676;
  --mf-radius: 14px;
  --mf-shadow: 0 1px 2px rgba(11, 37, 69, .06), 0 8px 24px rgba(11, 37, 69, .06);
  --mf-shadow-lg: 0 20px 50px rgba(11, 37, 69, .14);
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bs-body-color: var(--mf-text);
  --bs-primary: var(--mf-navy);
  --bs-primary-rgb: 11, 37, 69;
  --bs-success: var(--mf-emerald);
  --bs-success-rgb: 14, 159, 110;
  --bs-link-color: var(--mf-navy-3);
  --bs-link-color-rgb: 29, 68, 119;
  --bs-link-hover-color: var(--mf-emerald-dark);
  --bs-border-radius: 10px;
}

body { font-family: var(--bs-body-font-family); color: var(--mf-text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5 { color: var(--mf-navy); font-weight: 750; letter-spacing: -.02em; }
.display-5, .display-6 { font-weight: 800; letter-spacing: -.03em; }
a { text-underline-offset: 3px; }
.text-muted { color: var(--mf-muted) !important; }
.text-emerald { color: var(--mf-emerald) !important; }
.text-navy { color: var(--mf-navy) !important; }
.bg-navy { background: var(--mf-navy) !important; }
.bg-grey { background: var(--mf-grey) !important; }
.bg-emerald-soft { background: var(--mf-emerald-soft) !important; }
.fw-750 { font-weight: 750; }
.small-caps { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 2000; padding: .5rem 1rem; background: #fff; }
.skip-link:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 3px solid rgba(14, 159, 110, .55); outline-offset: 2px; }

/* Buttons */
.btn { font-weight: 600; border-radius: 10px; padding: .6rem 1.15rem; }
.btn-lg { padding: .8rem 1.5rem; font-size: 1.02rem; }
.btn-sm { padding: .35rem .7rem; }
.btn-primary { --bs-btn-bg: var(--mf-navy); --bs-btn-border-color: var(--mf-navy); --bs-btn-hover-bg: var(--mf-navy-2); --bs-btn-hover-border-color: var(--mf-navy-2); --bs-btn-active-bg: var(--mf-navy-2); }
.btn-success, .btn-emerald { --bs-btn-color: #fff; --bs-btn-bg: var(--mf-emerald); --bs-btn-border-color: var(--mf-emerald); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--mf-emerald-dark); --bs-btn-hover-border-color: var(--mf-emerald-dark); --bs-btn-active-bg: var(--mf-emerald-dark); --bs-btn-disabled-bg: var(--mf-emerald); }
.btn-outline-primary { --bs-btn-color: var(--mf-navy); --bs-btn-border-color: rgba(11, 37, 69, .25); --bs-btn-hover-bg: var(--mf-navy); --bs-btn-hover-border-color: var(--mf-navy); }
.btn-outline-light { --bs-btn-border-color: rgba(255, 255, 255, .45); }
.text-bg-primary { background-color: var(--mf-navy) !important; }
.text-bg-success { background-color: var(--mf-emerald) !important; }
.form-control, .form-select { border-radius: 10px; border-color: #cfd6e0; padding: .6rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--mf-emerald); box-shadow: 0 0 0 .2rem rgba(14, 159, 110, .15); }
.form-label { font-weight: 600; font-size: .92rem; color: var(--mf-navy); margin-bottom: .35rem; }
.form-check-input:checked { background-color: var(--mf-emerald); border-color: var(--mf-emerald); }
.card { border: 1px solid var(--mf-grey-2); border-radius: var(--mf-radius); box-shadow: var(--mf-shadow); }
.card-header { background: #fff; border-bottom: 1px solid var(--mf-grey-2); font-weight: 700; color: var(--mf-navy); padding: .9rem 1.25rem; border-radius: var(--mf-radius) var(--mf-radius) 0 0 !important; }
.table > :not(caption) > * > * { padding: .7rem .8rem; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--mf-muted); font-weight: 700; background: var(--mf-grey); border-bottom-width: 1px; white-space: nowrap; }
.badge { font-weight: 600; padding: .4em .7em; }
.alert { border-radius: 12px; border: 0; }
.alert-success { background: var(--mf-emerald-soft); color: #065f46; }

/* Top bar & navbar */
.topbar { background: var(--mf-navy); color: rgba(255, 255, 255, .82); font-size: .84rem; }
.topbar a { color: rgba(255, 255, 255, .9); text-decoration: none; }
.topbar a:hover { color: #fff; }
.site-nav { background: rgba(255, 255, 255, .97); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--mf-grey-2); }
.site-nav .navbar-brand { font-weight: 800; color: var(--mf-navy); letter-spacing: -.02em; display: flex; align-items: center; gap: .6rem; }
.site-nav .navbar-brand img { max-height: 42px; width: auto; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, var(--mf-navy) 0%, var(--mf-navy-3) 55%, var(--mf-emerald) 100%); display: inline-grid; place-items: center; color: #fff; font-size: 1.1rem; }
.site-nav .nav-link { color: var(--mf-text); font-weight: 600; font-size: .95rem; padding: .5rem .8rem !important; border-radius: 8px; }
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: var(--mf-navy); background: var(--mf-grey); }
.dropdown-menu { border: 1px solid var(--mf-grey-2); border-radius: 12px; box-shadow: var(--mf-shadow-lg); padding: .5rem; }
.dropdown-item { border-radius: 8px; padding: .5rem .75rem; font-weight: 500; }
.dropdown-item:active { background: var(--mf-navy); }

/* Hero */
.hero { position: relative; background: radial-gradient(1200px 500px at 85% -10%, rgba(14, 159, 110, .35), transparent 60%), linear-gradient(160deg, var(--mf-navy) 0%, #0f2f57 55%, #12406a 100%); color: #fff; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .9), transparent 85%); pointer-events: none; }
.hero.has-image { background-size: cover; background-position: center; }
.hero.has-image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(11, 37, 69, .95) 0%, rgba(11, 37, 69, .82) 50%, rgba(11, 37, 69, .45) 100%); }
.hero > .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1.08; font-weight: 800; letter-spacing: -.035em; }
.hero .lead { color: rgba(255, 255, 255, .85); font-size: 1.12rem; max-width: 36rem; }
.hero-badge { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); color: #d1fae5; padding: .35rem .8rem; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.hero-points li { color: rgba(255, 255, 255, .88); font-weight: 500; }
.hero-points i { color: #34d399; }
.calc-card { background: #fff; color: var(--mf-text); border-radius: 18px; box-shadow: var(--mf-shadow-lg); padding: 1.6rem; }
.calc-card .result { background: var(--mf-grey); border-radius: 12px; padding: 1rem 1.1rem; }
.calc-card .instalment { font-size: 2rem; font-weight: 800; color: var(--mf-navy); letter-spacing: -.03em; }
.form-range::-webkit-slider-thumb { background: var(--mf-emerald); }
.form-range::-moz-range-thumb { background: var(--mf-emerald); }

/* Sections */
.section { padding: 5rem 0; }
.section-sm { padding: 3.25rem 0; }
.section-title { max-width: 44rem; }
.eyebrow { color: var(--mf-emerald); font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .6rem; display: block; }
.page-header { background: linear-gradient(160deg, var(--mf-navy) 0%, #12406a 100%); color: #fff; padding: 3.5rem 0 3rem; position: relative; overflow: hidden; }
.page-header::after { content: ""; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(14, 159, 110, .35), transparent 65%); }
.page-header h1 { color: #fff; font-weight: 800; }
.page-header p { color: rgba(255, 255, 255, .82); max-width: 44rem; }
.page-header .breadcrumb a { color: rgba(255, 255, 255, .75); }
.page-header .breadcrumb-item.active, .page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, .55); }

.product-card { height: 100%; transition: transform .18s ease, box-shadow .18s ease; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--mf-shadow-lg); }
.icon-tile { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.45rem; background: var(--mf-emerald-soft); color: var(--mf-emerald-dark); }
.icon-tile.navy { background: rgba(11, 37, 69, .08); color: var(--mf-navy); }
.facts { list-style: none; padding: 0; margin: 0; }
.facts li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px dashed var(--mf-grey-2); font-size: .92rem; }
.facts li:last-child { border-bottom: 0; }
.facts li span:first-child { color: var(--mf-muted); }
.facts li span:last-child { font-weight: 650; color: var(--mf-navy); text-align: right; }
.feature { padding: 1.6rem; border-radius: var(--mf-radius); background: #fff; border: 1px solid var(--mf-grey-2); height: 100%; }
.step-num { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--mf-navy); color: #fff; font-weight: 800; margin-bottom: 1rem; box-shadow: 0 0 0 6px rgba(11, 37, 69, .08); }
.steps-line { position: relative; }
@media (min-width: 992px) { .steps-line::before { content: ""; position: absolute; top: 22px; left: 12%; right: 12%; height: 2px; background: repeating-linear-gradient(90deg, var(--mf-grey-2) 0 10px, transparent 10px 18px); } }
.testimonial { background: #fff; border-radius: var(--mf-radius); padding: 1.75rem; border: 1px solid var(--mf-grey-2); height: 100%; position: relative; }
.testimonial::before { content: "\201C"; position: absolute; top: .2rem; right: 1.2rem; font-size: 4.5rem; line-height: 1; color: var(--mf-emerald-soft); font-family: Georgia, serif; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--mf-navy); color: #fff; display: grid; place-items: center; font-weight: 700; object-fit: cover; }
.article-card img { aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--mf-radius) var(--mf-radius) 0 0; }
.article-placeholder { aspect-ratio: 16 / 9; border-radius: var(--mf-radius) var(--mf-radius) 0 0; background: linear-gradient(135deg, var(--mf-navy) 0%, var(--mf-navy-3) 60%, var(--mf-emerald) 130%); display: grid; place-items: center; color: rgba(255, 255, 255, .85); font-size: 2.2rem; }
.cta-band { background: linear-gradient(120deg, var(--mf-emerald-dark), var(--mf-emerald)); color: #fff; border-radius: 22px; padding: 3rem; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; }
.cta-band::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(255, 255, 255, .08); }
.contact-tile { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem; border-radius: var(--mf-radius); background: #fff; border: 1px solid var(--mf-grey-2); height: 100%; text-decoration: none; color: inherit; }
.contact-tile:hover { border-color: var(--mf-emerald); }
.prose { font-size: 1.04rem; line-height: 1.75; color: #2b3747; }
.prose h2 { font-size: 1.45rem; margin-top: 2.2rem; margin-bottom: .8rem; }
.prose h3 { font-size: 1.2rem; margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .35rem; }
.prose img { max-width: 100%; height: auto; border-radius: 12px; }
.prose blockquote { border-left: 4px solid var(--mf-emerald); padding: .25rem 0 .25rem 1rem; color: var(--mf-muted); }
.accordion-button { font-weight: 650; color: var(--mf-navy); }
.accordion-button:not(.collapsed) { background: var(--mf-emerald-soft); color: var(--mf-navy); box-shadow: none; }
.accordion-item { border-color: var(--mf-grey-2); }
.disclaimer { font-size: .86rem; color: var(--mf-muted); background: var(--mf-grey); border-radius: 10px; padding: .75rem 1rem; }

/* Footer */
.site-footer { background: #081b33; color: rgba(255, 255, 255, .72); font-size: .93rem; }
.site-footer h6 { color: #fff; font-weight: 700; letter-spacing: .02em; margin-bottom: 1rem; }
.site-footer a { color: rgba(255, 255, 255, .72); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .list-unstyled li { margin-bottom: .45rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; }
.social a { width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center; background: rgba(255, 255, 255, .08); color: #fff; margin-right: .35rem; }
.social a:hover { background: var(--mf-emerald); }
.whatsapp-float { position: fixed; right: 18px; bottom: 18px; z-index: 1030; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; font-size: 1.7rem; box-shadow: 0 10px 25px rgba(0, 0, 0, .2); text-decoration: none; }
.whatsapp-float:hover { color: #fff; background: #1ebe5b; }

/* Auth */
.auth-wrap { min-height: calc(100vh - 140px); display: flex; align-items: center; background: linear-gradient(180deg, var(--mf-grey) 0%, #fff 100%); padding: 3rem 0; }
.auth-card { max-width: 480px; width: 100%; margin: 0 auto; }
.auth-card.wide { max-width: 640px; }
.password-meter { height: 6px; border-radius: 3px; background: var(--mf-grey-2); overflow: hidden; }
.password-meter span { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }

/* Portal & admin shells */
.app-shell { display: flex; min-height: 100vh; background: var(--mf-grey); }
.sidebar { width: 260px; flex-shrink: 0; background: var(--mf-navy); color: rgba(255, 255, 255, .78); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { padding: 1.2rem 1.25rem; display: flex; align-items: center; gap: .6rem; color: #fff; font-weight: 800; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.sidebar .nav-section { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .45); padding: 1.1rem 1.25rem .4rem; font-weight: 700; }
.sidebar .nav-link { color: rgba(255, 255, 255, .78); padding: .55rem 1.25rem; display: flex; align-items: center; gap: .7rem; font-weight: 500; font-size: .93rem; border-left: 3px solid transparent; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.sidebar .nav-link.active { color: #fff; background: rgba(255, 255, 255, .08); border-left-color: var(--mf-emerald); }
.sidebar .nav-link .badge { margin-left: auto; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar { background: #fff; border-bottom: 1px solid var(--mf-grey-2); padding: .7rem 1.5rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 1020; }
.app-content { padding: 1.75rem 1.5rem 3rem; }
.page-title { font-size: 1.5rem; margin: 0; }
.stat { padding: 1.25rem; border-radius: var(--mf-radius); background: #fff; border: 1px solid var(--mf-grey-2); height: 100%; box-shadow: var(--mf-shadow); }
.stat .label { color: var(--mf-muted); font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat .value { font-size: 1.6rem; font-weight: 800; color: var(--mf-navy); letter-spacing: -.03em; line-height: 1.2; margin-top: .25rem; }
.stat .icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; }
.stat a { text-decoration: none; }
@media (max-width: 991.98px) {
  .sidebar { position: fixed; left: -280px; z-index: 1045; transition: left .2s ease; width: 270px; }
  .sidebar.open { left: 0; box-shadow: var(--mf-shadow-lg); }
  .app-content { padding: 1.25rem 1rem 3rem; }
  .section { padding: 3.5rem 0; }
}
.sidebar-backdrop { display: none; }
.sidebar.open + .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 1040; }
.dl-grid { display: grid; grid-template-columns: minmax(140px, 38%) 1fr; gap: .45rem 1rem; margin: 0; font-size: .93rem; }
.dl-grid dt { color: var(--mf-muted); font-weight: 500; }
.dl-grid dd { margin: 0; font-weight: 600; color: var(--mf-text); word-break: break-word; }

/* Application stepper */
.stepper { display: flex; gap: .25rem; overflow-x: auto; padding-bottom: .25rem; list-style: none; margin: 0; padding-left: 0; }
.stepper li { flex: 1; min-width: 110px; }
.stepper a, .stepper span { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-decoration: none; font-size: .78rem; font-weight: 600; color: var(--mf-muted); text-align: center; padding: .5rem .25rem; border-radius: 10px; }
.stepper .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--mf-grey-2); color: var(--mf-muted); font-size: .95rem; }
.stepper .done .dot { background: var(--mf-emerald); border-color: var(--mf-emerald); color: #fff; }
.stepper .current .dot { background: var(--mf-navy); border-color: var(--mf-navy); color: #fff; box-shadow: 0 0 0 5px rgba(11, 37, 69, .1); }
.stepper .current a, .stepper .current span { color: var(--mf-navy); }
.stepper .problem .dot { border-color: #dc3545; color: #dc3545; }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 4px; bottom: 4px; width: 2px; background: var(--mf-grey-2); }
.timeline li { position: relative; padding-left: 2.2rem; padding-bottom: 1.1rem; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--mf-emerald); }
.timeline li.internal::before { border-color: #adb5bd; }
.progress { border-radius: 99px; background: var(--mf-grey-2); }
.progress-bar { background: var(--mf-emerald); }
.doc-row { display: flex; align-items: center; gap: .75rem; padding: .7rem .9rem; border: 1px solid var(--mf-grey-2); border-radius: 10px; background: #fff; }
.doc-row + .doc-row { margin-top: .5rem; }
.req-doc { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; font-size: .92rem; }
.editor-toolbar { display: flex; gap: .25rem; flex-wrap: wrap; padding: .4rem; border: 1px solid #cfd6e0; border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--mf-grey); }
.editor-toolbar + textarea { border-top-left-radius: 0; border-top-right-radius: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88rem; }
.media-thumb { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px 10px 0 0; width: 100%; background: var(--mf-grey); }
.bar-chart { display: flex; align-items: flex-end; gap: .6rem; height: 140px; }
.bar-chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .3rem; height: 100%; font-size: .75rem; color: var(--mf-muted); }
.bar-chart .bar span.fill { width: 100%; max-width: 44px; background: linear-gradient(180deg, var(--mf-emerald), var(--mf-emerald-dark)); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.bar-chart .bar b { color: var(--mf-navy); font-size: .8rem; }
.table-actions { white-space: nowrap; text-align: right; }
.min-w-0 { min-width: 0; }

/* Print (Key Facts Statement, receipts) */
.print-page { max-width: 820px; margin: 2rem auto; background: #fff; padding: 2.5rem; border: 1px solid var(--mf-grey-2); border-radius: 12px; }
.print-page table { font-size: .88rem; }
@media print {
  .no-print, .whatsapp-float { display: none !important; }
  body { background: #fff !important; }
  .print-page { border: 0; margin: 0; padding: 0; max-width: none; }
  a { text-decoration: none; color: inherit; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
