/* =====================================================================
   Bifton theme on Color Admin 5.5.2 — Facebook variant, no sidebar.
   Fonts: Manrope (text), Sora (titles and amounts). Brand blue #2f74c0.
   ===================================================================== */
:root, .app {
    --bs-app-theme: #2f74c0;
    --bs-app-theme-rgb: 47, 116, 192;
    --bs-app-theme-color: #fff;
    --bs-app-theme-gradient: linear-gradient(135deg, #2f74c0, #14365e);
    --bs-font-sans-serif: "Manrope", -apple-system, "Segoe UI", Roboto, sans-serif;
    --bs-body-font-family: var(--bs-font-sans-serif);
    --bf-display: "Sora", "Manrope", sans-serif;
    --bf-blue: #2f74c0;
    --bf-blue-600: #255f9f;
    --bf-blue-900: #14365e;
    --bf-green: #16a34a;
    --bf-red: #e5484d;
}
body { font-family: var(--bs-font-sans-serif); -webkit-font-smoothing: antialiased; }
.page-header, h1, h2, h3, h4, h5, .bf-num, .bf-amount, .bf-stat-value, .bf-hw b, .bf-hw-card-total {
    font-family: var(--bf-display);
    letter-spacing: -.02em;
}
.page-header { font-weight: 700; font-size: 26px; }
.bf-num, .bf-amount { font-variant-numeric: tabular-nums; white-space: nowrap; }

.btn-theme, .btn-primary {
    --bs-btn-bg: var(--bf-blue); --bs-btn-border-color: var(--bf-blue); --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--bf-blue-600); --bs-btn-hover-border-color: var(--bf-blue-600); --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--bf-blue-900); --bs-btn-active-border-color: var(--bf-blue-900);
    --bs-btn-disabled-bg: var(--bf-blue); --bs-btn-disabled-border-color: var(--bf-blue);
}
.text-theme { color: var(--bf-blue) !important; }
.bg-theme { background-color: var(--bf-blue) !important; }
.progress-bar { background-color: var(--bf-blue); }
a { color: var(--bf-blue); }

/* ---------- Header ---------- */
.bf-logo { display: inline-flex; align-items: center; background: #fff; border-radius: 10px; padding: 5px 10px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.bf-logo img { height: 24px; display: block; }
.app-header .navbar-brand { display: flex; align-items: center; }
.app-header .navbar-user img { object-fit: cover; }

/* Accounts inside the header */
.app-header { --bf-hw-bg: rgba(15, 23, 42, .05); --bf-hw-bg-hover: rgba(15, 23, 42, .09); --bf-hw-muted: #64748b; --bf-hw-text: #0e1a2b; }
.app-header[data-bs-theme="dark"] { --bf-hw-bg: rgba(255, 255, 255, .12); --bf-hw-bg-hover: rgba(255, 255, 255, .2); --bf-hw-muted: rgba(255, 255, 255, .72); --bf-hw-text: #fff; }
.app-header .navbar-nav .navbar-item .navbar-link.bf-hw {
    display: flex; align-items: center; gap: 10px;
    height: 40px; margin: 0 4px; padding: 0 12px 0 5px;
    border-radius: 999px; background: var(--bf-hw-bg); color: var(--bf-hw-text);
    line-height: 1; text-decoration: none; white-space: nowrap;
}
.app-header .navbar-nav .navbar-item .navbar-link.bf-hw:hover,
.app-header .navbar-nav .navbar-item.show .navbar-link.bf-hw { background: var(--bf-hw-bg-hover); }
.app-header .navbar-nav .navbar-item .navbar-link.bf-hw::after { display: none; }
.bf-hw-ico { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; flex: 0 0 30px; }
.bf-hw-main .bf-hw-ico, .bf-hw-compact .bf-hw-ico { background: linear-gradient(135deg, #14365e, #2f74c0); }
.bf-hw-affinity .bf-hw-ico { background: linear-gradient(135deg, #0b6b3a, #16a34a); }
.bf-hw-txt { display: flex; flex-direction: column; gap: 3px; }
.bf-hw-txt small { font-size: 10.5px; font-weight: 600; color: var(--bf-hw-muted); }
.bf-hw b { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bf-hw em { font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--bf-hw-muted); font-family: var(--bs-font-sans-serif); letter-spacing: 0; }
.bf-hw-split { display: flex; gap: 8px; padding-left: 10px; border-left: 1px solid var(--bf-hw-bg-hover); font-size: 12px; font-weight: 700; }
.bf-hw-split span { display: inline-flex; align-items: center; gap: 4px; }
.bf-hw-split img { width: 16px; height: 16px; border-radius: 4px; background: #fff; object-fit: cover; }
.bf-hw-caret { font-size: 9px; color: var(--bf-hw-muted); }
.bf-hw-compact { padding-right: 14px !important; gap: 8px !important; }

.bf-hw-menu { width: 300px; padding: 10px; border: 0; border-radius: 16px; box-shadow: 0 16px 40px rgba(15, 23, 42, .18); }
.bf-hw-card { border-radius: 12px; padding: 12px 14px; color: #fff; }
.bf-hw-card.bf-hw-main { background: linear-gradient(135deg, #14365e, #2f74c0); }
.bf-hw-card.bf-hw-affinity { background: linear-gradient(135deg, #0b6b3a, #16a34a); }
.bf-hw-card-title { font-size: 12px; font-weight: 600; opacity: .8; }
.bf-hw-card-total { font-size: 24px; font-weight: 700; }
.bf-hw-card-total small { font-size: 12px; opacity: .75; font-family: var(--bs-font-sans-serif); letter-spacing: 0; }
.bf-hw-rows { padding: 8px 4px 2px; }
.bf-hw-rows > div { display: flex; align-items: center; gap: 10px; padding: 7px 4px; font-size: 13px; color: var(--bs-body-color); }
.bf-hw-rows img { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; }
.bf-hw-rows b { margin-left: auto; font-family: var(--bf-display); font-variant-numeric: tabular-nums; }
.bf-hw-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 6px 0 2px; }
.bf-hw-actions a { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 4px; border-radius: 10px; background: var(--bs-tertiary-bg); color: var(--bs-body-color); text-decoration: none; font-size: 11.5px; font-weight: 600; text-align: center; }
.bf-hw-actions a i { width: 30px; height: 30px; border-radius: 50%; background: var(--bf-blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.bf-hw-actions a:hover { background: rgba(47, 116, 192, .1); }
@media (max-width: 1399.98px) { .bf-hw-split { display: none; } }

/* ---------- Top menu ---------- */
.app-top-menu { background: #fff; box-shadow: 0 1px 0 rgba(15,23,42,.06); }
.app-top-menu .menu .menu-item > .menu-link { color: #334155; font-weight: 600; }
.app-top-menu .menu .menu-item > .menu-link .menu-icon { color: #94a3b8; }
.app-top-menu .menu .menu-item:hover > .menu-link { color: #0e1a2b; }
.app-top-menu .menu .menu-item.active > .menu-link { font-weight: 700; }
@media (min-width: 768px) {
    .app-top-menu .menu .menu-item .menu-submenu { background: #fff; border-radius: 12px; padding: 6px; min-width: 230px; box-shadow: 0 16px 40px rgba(15,23,42,.16); }
    .app-top-menu .menu .menu-submenu .menu-item > .menu-link { border-radius: 8px; padding: 8px 12px; color: #334155; }
    .app-top-menu .menu .menu-submenu .menu-item > .menu-link:hover, .app-top-menu .menu .menu-submenu .menu-item.active > .menu-link { background: rgba(47,116,192,.08); color: var(--bf-blue-900); }
}
.app-top-menu .menu .menu-item.bf-menu-alert > .menu-link .menu-icon { color: var(--bf-red); }

/* ---------- Content ---------- */
.app-without-sidebar .app-content { max-width: 1440px; margin-left: auto; margin-right: auto; }
.bf-card { border: 0; border-radius: 18px; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06); }
.bf-card > .card-header { background: none; border: 0; padding: 16px 16px 4px; }
.bf-card > .card-header h5 { font-weight: 700; margin: 0; }

.bf-narrow { max-width: 520px; margin: 0 auto 24px; }
.bf-page-icon { width: 48px; height: 48px; border-radius: 14px; background: rgba(47,116,192,.1); color: var(--bf-blue); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 16px; }

/* Title bar with inline stats */
.bf-titlebar { display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.bf-titlebar-head { margin-right: auto; }
.bf-titlebar-head .breadcrumb { margin-bottom: 4px; }
.bf-stats { display: flex; align-items: stretch; }
.bf-stat { display: flex; flex-direction: column; gap: 4px; padding: 0 18px; border-left: 1px solid var(--bs-border-color); white-space: nowrap; }
.bf-stat:first-child { border-left: 0; padding-left: 0; }
.bf-stat-label { font-size: 11.5px; font-weight: 600; color: var(--bs-secondary-color); text-transform: uppercase; letter-spacing: .04em; }
.bf-stat-value { display: inline-flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--bs-emphasis-color); }
.bf-stat-value em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--bs-secondary-color); font-family: var(--bs-font-sans-serif); letter-spacing: 0; margin-left: -2px; }
.bf-s-ok { color: var(--bf-green) !important; }
.bf-s-bad { color: var(--bf-red) !important; }
.bf-s-warn { color: #e08a00 !important; }
.bf-ring { width: 16px; height: 16px; border-radius: 50%; background: conic-gradient(var(--bf-blue) calc(var(--p) * 1%), rgba(127,127,127,.2) 0); -webkit-mask: radial-gradient(circle 5px, transparent 98%, #000); mask: radial-gradient(circle 5px, transparent 98%, #000); }
.bf-titlebar-actions { display: flex; gap: 8px; align-self: center; }

/* Status pills */
.bf-pill { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid; background: transparent; white-space: nowrap; }
.bf-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.bf-pill-success { color: var(--bf-green); border-color: rgba(22,163,74,.35); background: rgba(22,163,74,.08); }
.bf-pill-danger { color: var(--bf-red); border-color: rgba(229,72,77,.35); background: rgba(229,72,77,.08); }
.bf-pill-primary { color: var(--bf-blue); border-color: rgba(47,116,192,.35); background: rgba(47,116,192,.08); }
.bf-pill-warning { color: #c27700; border-color: rgba(224,138,0,.35); background: rgba(224,138,0,.08); }
.bf-pill-muted { color: #64748b; border-color: rgba(100,116,139,.3); background: rgba(100,116,139,.06); }

/* Tables */
.bf-table { margin-bottom: 0; width: 100% !important; }
.bf-table thead th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; color: var(--bs-secondary-color); border-bottom-width: 1px; padding: 12px 16px; white-space: nowrap; }
.bf-table td { padding: 14px 16px; font-variant-numeric: tabular-nums; vertical-align: middle; }
.bf-table .progress { height: 6px; background: rgba(127,127,127,.15); border-radius: 99px; min-width: 90px; }
.bf-table .progress-bar { border-radius: 99px; }
.bf-table tr.bf-row-late > td:first-child { box-shadow: inset 3px 0 0 var(--bf-red); }
.bf-table .bf-req-link { font-weight: 600; text-decoration: none; }
.bf-table .bf-req-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.bf-table .bf-req-actions .btn { --bs-btn-padding-y: 2px; --bs-btn-padding-x: 8px; --bs-btn-font-size: 11.5px; border-radius: 999px; }
.bf-details td { background: var(--bs-tertiary-bg); }
.bf-empty { padding: 32px 16px; text-align: center; color: var(--bs-secondary-color); }

/* Legacy row states: rows stay neutral, a badge next to the request id carries the meaning */
table.dataTable.bf-table tbody tr.delayed,
table.dataTable.bf-table tbody tr.engagement-failed,
table.dataTable.bf-table tbody tr.locked { background: transparent !important; }
.bf-flag { display: inline-flex; align-items: center; gap: 4px; margin: 4px 4px 0 0; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; vertical-align: middle; cursor: help; }
.bf-flag i { font-size: 10px; }
.bf-flag-danger { color: #c62828; background: rgba(229,72,77,.1); }
.bf-flag-warning { color: #a15c00; background: rgba(224,138,0,.12); }
.bf-table td, .bf-table th { font-size: 13px; }
.bf-table tbody th { font-weight: 700; padding: 14px 16px; vertical-align: middle; }
.bf-table td > a:first-child { display: block; width: fit-content; font-weight: 700; text-decoration: none; }
.bf-table td p { margin-bottom: 2px; }
.bf-table td .btn { margin-top: 4px; }
.bf-table td ul { padding-left: 16px; margin: 0; }
.bf-table > :not(caption) > * > * { border-bottom-color: var(--bs-border-color) !important; }
.bf-table > thead > tr > th { border-bottom-color: var(--bs-border-color) !important; }
.bf-table tbody th { font-weight: 600; }

/* Score bars (uib-progressbar): thin colored track, value on the right */
.bf-table .progress { position: relative; height: 8px; min-width: 110px; margin-right: 76px; overflow: visible; background: rgba(127,127,127,.15); border-radius: 99px; }
.bf-table .progress .progress-bar { position: static; border-radius: 99px; background-image: none !important; animation: none !important; overflow: visible; }
.bf-table .progress .progress-bar > span { position: absolute; left: calc(100% + 10px); right: auto; width: auto; text-align: left; top: 50%; transform: translateY(-50%); color: var(--bs-body-color); font-size: 12px; font-weight: 700; white-space: nowrap; font-family: var(--bf-display); }
.progress-bar-info, .progress-bar-primary { background-color: var(--bf-blue) !important; }
.progress-bar-success { background-color: var(--bf-green) !important; }
.progress-bar-warning { background-color: #e08a00 !important; }
.progress-bar-danger { background-color: var(--bf-red) !important; }

/* Row actions: soft blue pills instead of black buttons */
.bf-table .btn-inverse, .bf-table .btn-primary.btn-xs {
    --bs-btn-bg: rgba(47,116,192,.1); --bs-btn-border-color: transparent; --bs-btn-color: var(--bf-blue-600);
    --bs-btn-hover-bg: var(--bf-blue); --bs-btn-hover-border-color: var(--bf-blue); --bs-btn-hover-color: #fff;
    box-shadow: none !important;
}
.bf-table td .btn { display: inline-flex !important; align-items: center; gap: 5px; }

/* ---------- Polished tables ---------- */
.bf-table thead th { background: #f3f5f8; color: #6b7a8c; font-size: 11px; letter-spacing: .06em; border-bottom: 0 !important; padding-top: 10px; padding-bottom: 10px; }
.bf-table thead th:first-child { border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
.bf-table thead th:last-child { border-top-right-radius: 10px; border-bottom-right-radius: 10px; }
.bf-card .card-body > .dataTables_wrapper, .bf-card .card-body { padding-left: 8px !important; padding-right: 8px !important; }
.bf-table tbody tr { transition: background-color .15s; }
.bf-table tbody tr:hover > * { background-color: rgba(47,116,192,.035) !important; }
.bf-table tbody td, .bf-table tbody th { padding-top: 16px; padding-bottom: 16px; }
.bf-table tbody tr:last-child > * { border-bottom: 0 !important; }

.bf-money { font-family: var(--bf-display); font-weight: 600; font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--bs-emphasis-color); }
.bf-money small { margin-left: 4px; font-family: var(--bs-font-sans-serif); font-size: 10.5px; font-weight: 600; color: var(--bs-secondary-color); }
.bf-date { display: inline-flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.bf-date b { font-weight: 600; color: var(--bs-emphasis-color); }
.bf-date small { font-size: 11.5px; color: var(--bs-secondary-color); }
.bf-tag { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #f1f4f8; color: #415066; font-size: 12px; font-weight: 600; white-space: nowrap; }

.bf-dl { display: flex; align-items: center; gap: 8px; width: fit-content; margin: 2px 0; padding: 3px 10px 3px 8px; border-radius: 8px; background: #eef2f7; font-size: 12px; white-space: nowrap; }
.bf-dl > span { color: var(--bs-secondary-color); min-width: 72px; }
.bf-dl > b { font-family: var(--bf-display); font-weight: 600; color: var(--bs-emphasis-color); }
.bf-dl > i { font-size: 11px; }
.bf-dl.is-paid { background: rgba(22,163,74,.08); }
.bf-dl.is-late { background: rgba(229,72,77,.08); }
.bf-dl.is-soon { background: rgba(224,138,0,.1); }

/* Responsive expand control: thin chevron instead of the filled "+" disc */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > td:first-child:before {
    content: "\f078" !important; font-family: "Font Awesome 6 Free" !important; font-weight: 900; font-size: 9px;
    color: var(--bf-blue) !important; background: rgba(47,116,192,.1) !important;
    width: 20px !important; height: 20px !important; line-height: 20px !important; margin-top: -10px !important;
    text-indent: 0 !important; text-align: center; box-shadow: none !important; border: 0 !important;
}
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td:first-child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent[role="row"] > td:first-child:before { content: "\f077" !important; background: var(--bf-blue) !important; color: #fff !important; }
table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child { position: relative; padding-left: 42px !important; }

/* Expanded row details (DataTables responsive) */
table.dataTable.bf-table > tbody > tr.child > td.child { background: #f8fafc; padding: 16px 24px; white-space: normal; }
table.dataTable.bf-table > tbody > tr.child ul.dtr-details { width: 100%; }
table.dataTable.bf-table > tbody > tr.child ul.dtr-details > li { padding: 10px 0; border-bottom: 1px solid var(--bs-border-color); }
table.dataTable.bf-table > tbody > tr.child ul.dtr-details > li:last-child { border-bottom: 0; }
table.dataTable.bf-table > tbody > tr.child span.dtr-title { min-width: 160px; font-weight: 700; color: var(--bs-secondary-color); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }

/* Split button caret */
.bf-split { font-size: 11px; border-left: 1px solid rgba(255,255,255,.45) !important; }
table.dataTable thead th, table.dataTable thead td { border-bottom: 1px solid var(--bs-border-color) !important; }
table.dataTable.no-footer { border-bottom: 0 !important; }

/* Legacy buttons */
.btn-xs { --bs-btn-padding-y: 2px; --bs-btn-padding-x: 8px; --bs-btn-font-size: 11.5px; --bs-btn-border-radius: 999px; font-weight: 600; }
.btn-inverse { --bs-btn-bg: #0e1a2b; --bs-btn-border-color: #0e1a2b; --bs-btn-color: #fff; --bs-btn-hover-bg: #1e293b; --bs-btn-hover-border-color: #1e293b; --bs-btn-hover-color: #fff; }
.btn-white { --bs-btn-bg: #fff; --bs-btn-border-color: var(--bs-border-color); --bs-btn-color: var(--bs-body-color); --bs-btn-hover-bg: var(--bs-tertiary-bg); }

/* Tabs */
.bf-tabs .nav-link { border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--bs-secondary-color); }
.bf-tabs .nav-link.active { background: var(--bf-blue) !important; color: #fff !important; }

/* DataTables inside bf cards */
.bf-card .dataTables_wrapper .row { margin: 0; padding: 0 16px; }
.bf-card .dataTables_wrapper .row > div { padding: 0; }
.bf-card .dataTables_filter input { border-radius: 999px; padding: 4px 12px; border: 1px solid var(--bs-border-color); }
.bf-card .dataTables_info, .bf-card .dataTables_paginate { padding: 12px 0 !important; font-size: 13px; }

/* Footer / share */
.bf-footer { max-width: 1440px; margin: 0 auto; padding: 8px 30px 96px; color: var(--bs-secondary-color); font-size: 13px; }
.bf-footer-inner { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: 16px; background: var(--bs-body-bg); }
.bf-footer-inner p { margin: 0; }
.bf-footer-ico { flex: 0 0 38px; height: 38px; border-radius: 12px; background: rgba(47,116,192,.1); color: var(--bf-blue); display: inline-flex; align-items: center; justify-content: center; }
.bf-share { position: fixed; right: 16px; bottom: 16px; z-index: 1030; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; background: #25d366; color: #fff !important; text-decoration: none; font-weight: 700; box-shadow: 0 8px 24px rgba(37,211,102,.35); }
.bf-share i { font-size: 20px; }

/* Modals (ui-bootstrap) */
.modal-content { border: 0; border-radius: 18px; box-shadow: 0 20px 50px rgba(15,23,42,.25); overflow: hidden; }
.modal-header { padding: 16px 20px; }
.modal-header .modal-title { font-family: var(--bf-display); font-weight: 700; font-size: 18px; }
.modal-footer { background: var(--bs-tertiary-bg); }

/* ---------- Mobile ---------- */
.bf-mlist { padding: 0 12px 12px; display: grid; gap: 10px; }
.bf-mitem { border: 1px solid var(--bs-border-color); border-radius: 14px; padding: 14px; }
@media (max-width: 991.98px) {
    .bf-titlebar { align-items: center; gap: 12px; }
    .bf-stats { order: 3; flex: 1 1 100%; overflow-x: auto; margin: 0 -15px; padding: 10px 15px; scrollbar-width: none; border-top: 1px solid var(--bs-border-color); border-bottom: 1px solid var(--bs-border-color); }
    .bf-stats::-webkit-scrollbar { display: none; }
    .bf-stat { padding: 0 14px; }
    .bf-stat-value { font-size: 15px; }
}
@media (max-width: 767.98px) {
    .page-header { font-size: 22px; }
    .app-header .navbar-nav { border-top: 0 !important; }
    .bf-tabs { display: none; }
    .bf-footer { padding: 0 15px 88px; }
    .bf-share { padding: 0; width: 52px; height: 52px; justify-content: center; }
    .bf-share span { display: none; }
    .bf-share i { font-size: 24px; }
}

/* DataTables Responsive expand control (legacy td:first-child selector) */
table.dataTable.bf-table.dtr-inline.collapsed > tbody > tr > td:first-child:before {
    position: absolute !important; top: 50% !important; left: 12px !important; display: block !important;
    width: 20px !important; height: 20px !important; margin-top: -10px !important; line-height: 20px !important;
    content: "\f078" !important; font-family: "Font Awesome 6 Free" !important; font-weight: 900 !important; font-size: 9px !important;
    text-indent: 0 !important; text-align: center !important; border-radius: 50% !important; border: 0 !important; box-shadow: none !important;
    color: var(--bf-blue) !important; background: rgba(47,116,192,.12) !important;
}
table.dataTable.bf-table.dtr-inline.collapsed > tbody > tr.parent > td:first-child:before { content: "\f077" !important; background: var(--bf-blue) !important; color: #fff !important; }
.bf-table tbody td:first-child { white-space: normal; }
@media (max-width: 767.98px) {
    .bf-card .card-body { padding-left: 0 !important; padding-right: 0 !important; }
    .bf-card .dataTables_wrapper .row { padding: 0 8px; }
    .bf-table thead th:first-child, .bf-table thead th:last-child { border-radius: 0; }
    .bf-table .bf-flag { display: flex; width: fit-content; }
}
.bf-flags { display: flex; flex-wrap: wrap; gap: 4px; } .bf-flags .bf-flag { margin: 4px 0 0; }

/* Score inside the bar; deadlines and reasons without background */
.bf-table .progress { height: 18px; margin-right: 0; min-width: 120px; }
.bf-table .progress .progress-bar > span {
    left: 50% !important; transform: translate(-50%, -50%) !important;
    color: #0e1a2b; font-size: 11px; text-shadow: 0 0 3px rgba(255,255,255,.9), 0 0 1px #fff;
}
.bf-tag { padding: 0; background: none; color: var(--bs-body-color); font-weight: 600; border-radius: 0; }
.bf-dl, .bf-dl.is-paid, .bf-dl.is-late, .bf-dl.is-soon { background: none; padding: 1px 0; border-radius: 0; }
.bf-table .progress { background: #eef1f5; }
.bf-table .progress-bar-info, .bf-table .progress-bar-primary { background-color: #a9c6e8 !important; }
.bf-table .progress-bar-success { background-color: #9fdcb5 !important; }
.bf-table .progress-bar-warning { background-color: #f6cf8f !important; }
.bf-table .progress-bar-danger { background-color: #f4aeb0 !important; }
.bf-table .progress .progress-bar > span { text-shadow: none; color: #1f2a37; }

/* Light band on card headers */
.bf-card > .card-header {
    background: #eaf2fb !important;
    border-bottom: 1px solid #d6e4f5 !important;
    padding: 12px 16px !important;
    border-top-left-radius: inherit; border-top-right-radius: inherit;
}
.bf-card > .card-header h5 { position: relative; padding-left: 12px; font-size: 15px; }
.bf-card > .card-header h5::before { content: ""; position: absolute; left: 0; top: 50%; width: 4px; height: 16px; margin-top: -8px; border-radius: 4px; background: var(--bf-blue); }
.bf-card > .card-header + .card-body { padding-top: 8px !important; }

/* Long reasons wrap instead of pushing the table out of its card */
.bf-tag { white-space: normal; }
.bf-table td:has(> .bf-tag) { white-space: normal; min-width: 120px; }

/* Score bars: slightly darker tints */
.bf-table .progress-bar-info, .bf-table .progress-bar-primary { background-color: #7fa8da !important; }
.bf-table .progress-bar-success { background-color: #6fc994 !important; }
.bf-table .progress-bar-warning { background-color: #efb65c !important; }
.bf-table .progress-bar-danger { background-color: #ec8c8f !important; }
.bf-table .progress { background: #e6eaf0; }

/* ---------- Transactions page ---------- */
.bf-totals { display: flex; flex-wrap: wrap; gap: 12px 0; padding: 14px 16px 16px; margin: 0 8px 4px; border-bottom: 1px solid var(--bs-border-color); }
.bf-totals .bf-stat { padding: 0 20px; }
.bf-totals .bf-stat:first-child { padding-left: 8px; }
.bf-totals .bf-stat-value { font-size: 16px; }
.bf-left { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 600; color: #c27700; white-space: nowrap; }
.bf-row-note { margin: 6px 0 0; font-size: 12px; font-weight: 600; line-height: 1.35; }
.bf-table td .badge { display: inline-block !important; margin-top: 6px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.bf-table td .badge-primary { background: rgba(47,116,192,.1) !important; color: var(--bf-blue-600) !important; }
.bf-card > .card-header h6 { margin: 0; font-size: 13px; font-weight: 700; font-family: var(--bf-display); color: var(--bs-emphasis-color); }
.bf-chart > .card-header { padding: 10px 16px !important; }
.bf-chart .card-body { padding: 16px !important; }
.bf-table td .btn-danger.btn-xs { --bs-btn-bg: rgba(229,72,77,.1); --bs-btn-border-color: transparent; --bs-btn-color: #c62828; --bs-btn-hover-bg: var(--bf-red); --bs-btn-hover-color: #fff; box-shadow: none !important; }
.bf-table td .btn-success.btn-xs { --bs-btn-bg: rgba(22,163,74,.1); --bs-btn-border-color: transparent; --bs-btn-color: #15803d; --bs-btn-hover-bg: var(--bf-green); --bs-btn-hover-color: #fff; box-shadow: none !important; }
.bf-table td .btn-warning.btn-xs { --bs-btn-bg: rgba(224,138,0,.12); --bs-btn-border-color: transparent; --bs-btn-color: #a15c00; --bs-btn-hover-bg: #e08a00; --bs-btn-hover-color: #fff; box-shadow: none !important; }
.bf-table td .btn-white.btn-xs { --bs-btn-bg: #f1f4f8; --bs-btn-border-color: transparent; --bs-btn-color: #415066; box-shadow: none !important; }
.bf-table td .btn + .btn, .bf-table td .btn-block { margin-top: 4px; }
@media (max-width: 767.98px) {
    .bf-totals { margin: 0; padding: 12px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
    .bf-totals .bf-stat { padding: 0 14px; }
}
table.dataTable.bf-table.dtr-inline.collapsed > tbody > tr.child > td:first-child:before { display: none !important; content: none !important; } table.dataTable.bf-table.dtr-inline.collapsed > tbody > tr.child > td.child { padding-left: 24px !important; }
table.dataTable > tbody > tr.child > td::before, table.dataTable > tbody > tr.child > td.child::before { content: none !important; display: none !important; }

/* Amount masking (eye toggle in the header) */
.bf-amt { display: inline-block; position: relative; }
.bf-masked .bf-amt { visibility: hidden; }
.bf-masked .bf-amt::before { content: "••••"; visibility: visible; position: absolute; left: 0; top: 50%; transform: translateY(-50%); letter-spacing: .1em; color: inherit; }
.bf-mask-toggle { font-size: 16px; }

/* Transactions: segmented tabs, filter chips, chart box */
.bf-seg { display: flex; gap: 6px; border: 0; }
.bf-seg a { display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 10px; background: #f3f5f8; color: #415066; font-weight: 700; text-decoration: none; border: 1px solid #e6ebf1; }
.bf-seg a.active { background: #eaf2fb; color: #255f9f; border-color: #d6e4f5; }
.bf-count { margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: #fff; font-size: 11.5px; }
.bf-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 12px 16px !important; }
.bf-filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bf-filter-label { color: var(--bs-secondary-color); font-size: 13px; width: 16px; text-align: center; }
.bf-chipbtn { border: 1px solid #e6ebf1; background: #fff; color: #415066; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s; white-space: nowrap; }
.bf-chipbtn i { color: #94a3b8; margin-right: 2px; }
.bf-chipbtn:hover { border-color: #b8cde6; }
.bf-chipbtn.on { background: var(--bf-blue); border-color: var(--bf-blue); color: #fff; }
.bf-chipbtn.on i { color: #fff; }
.bf-search { position: relative; }
.bf-search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 12px; }
.bf-search .form-control { height: 34px; padding-left: 30px; border-radius: 999px; font-size: 13px; width: 220px; }
.bf-more-link { align-self: center; margin-left: auto; padding: 0 12px; font-size: 12.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.bf-chart-box { position: relative; height: 340px; }
.bf-chart-box canvas { height: 340px !important; }
.bf-chart-pie { max-width: 520px; margin: 0 auto; }
.bf-card .dataTables_length, .bf-card .dataTables_info { font-size: 12.5px; color: var(--bs-secondary-color); padding: 10px 0 !important; }
.bf-card .dataTables_length select { border: 1px solid #e6ebf1; border-radius: 8px; padding: 2px 6px; margin: 0 4px; }
.bf-card .dataTables_paginate .paginate_button { border-radius: 8px !important; border: 0 !important; padding: 4px 10px !important; margin: 0 2px; font-weight: 600; }
.bf-card .dataTables_paginate .paginate_button.current, .bf-card .dataTables_paginate .paginate_button.current:hover { background: var(--bf-blue) !important; color: #fff !important; }
.bf-card .dataTables_paginate .paginate_button:hover { background: #eaf2fb !important; color: #255f9f !important; }
@media (max-width: 767.98px) { .bf-search .form-control { width: 100%; } .bf-filter-group.ms-lg-auto { flex: 1 1 100%; } .bf-chart-box, .bf-chart-box canvas { height: 260px !important; } }
.bf-card .dataTables_length label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 500; } .bf-card .dataTables_length select { width: auto !important; display: inline-block; }
.bf-masked .bf-amt { min-width: 2.6em; } .bf-masked .bf-hw-split .bf-amt { min-width: 2.2em; }
.bf-masked .bf-hw-split .bf-amt::before { letter-spacing: 0; }
.bf-range label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; font-weight: 600; color: var(--bs-secondary-color); } .bf-range .form-control { height: 32px; width: 150px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; }

/* Debt / credit / score in the header */
.bf-header-stats { margin: 0 6px; padding: 0 14px; height: 40px; border-radius: 999px; background: var(--bf-hw-bg); }
.bf-header-stats .bf-stats { display: flex; align-items: center; height: 100%; margin: 0; padding: 0; border: 0; overflow: visible; }
.bf-header-stats .bf-stat { flex-direction: row; align-items: baseline; gap: 6px; padding: 0 12px; border-left-color: rgba(127,127,127,.25); }
.bf-header-stats .bf-stat:first-child { padding-left: 0; }
.bf-header-stats .bf-stat:last-child { padding-right: 0; }
.bf-header-stats .bf-stat-label { font-size: 10.5px; color: var(--bf-hw-muted); }
.bf-header-stats .bf-stat-value { font-size: 14px; color: var(--bf-hw-text); }
.bf-header-stats .bf-stat-value.bf-s-bad { color: var(--bf-red); }
.bf-header-stats .bf-stat-value.bf-s-ok { color: var(--bf-green); }
.bf-header-stats .bf-stat-value em { display: none; }
@media (max-width: 1599.98px) { .bf-header-stats ~ * .bf-hw-split, .app-header .bf-hw-split { display: none; } }
.bf-stats-wrap { display: contents; }
.app-header .bf-header-cta { white-space: nowrap; }
.app-header .navbar-header { flex: 0 0 auto; width: auto; } .app-header .navbar-nav { min-width: 0; }

/* Below 1400px: debt/credit/score as a compact strip that stays under the fixed header */
.bf-stats-strip { position: sticky; top: var(--bf-sticky-top, 50px); z-index: 1005; margin: -12px -15px 20px; padding: 8px 15px; background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid #e6ebf1; }
.bf-stats-strip .bf-stats { margin: 0 !important; padding: 0 !important; border: 0 !important; overflow-x: auto; scrollbar-width: none; }
.bf-stats-strip .bf-stats::-webkit-scrollbar { display: none; }
.bf-stats-strip .bf-stat { flex-direction: row; align-items: baseline; gap: 6px; padding: 0 14px; }
.bf-stats-strip .bf-stat:first-child { padding-left: 0; }
.bf-stats-strip .bf-stat-label { font-size: 10.5px; }
.bf-stats-strip .bf-stat-value { font-size: 14px; }
.app-header .bf-header-cta { padding-left: 16px !important; padding-right: 16px !important; }
.app-header .bf-header-btn2 { --bs-btn-bg: var(--bf-hw-bg); --bs-btn-border-color: transparent; --bs-btn-color: var(--bf-hw-text); --bs-btn-hover-bg: var(--bf-hw-bg-hover); --bs-btn-hover-color: var(--bf-hw-text); height: 38px; display: inline-flex; align-items: center; padding: 0 14px; white-space: nowrap; box-shadow: none !important; }
.bf-mini-cta { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; background: var(--bf-blue); color: #fff; font-size: 12.5px; font-weight: 700; }
@media (max-width: 575.98px) {
    .bf-mini-cta { padding: 5px 10px; font-size: 12px; }
    .bf-mini-cta i { display: none; }
    .bf-hw-compact em { display: none; }
    .app-header .navbar-nav { justify-content: flex-end; flex-wrap: nowrap; }
    .app-header .navbar-nav .navbar-item .navbar-link:not(.bf-hw) { padding-left: 6px; padding-right: 6px; }
    .app-header .navbar-nav .navbar-item .navbar-link.bf-hw { margin: 0 2px; padding-right: 10px !important; }
}

/* Header second row (>= 768px): debt / credit / score inside the fixed header */
@media (min-width: 768px) {
    .app.app-header-fixed .app-header { flex-wrap: wrap; height: auto; }
    .app.app-header-fixed .app-header > .navbar-header, .app.app-header-fixed .app-header > .navbar-nav { height: 60px; }
    .bf-header-row2 { flex: 0 0 100%; height: 36px; align-items: center; padding: 0 20px; border-top: 1px solid rgba(127,127,127,.18); background: rgba(127,127,127,.05); }
    .bf-header-row2 .bf-stats { display: flex; align-items: center; margin: 0; padding: 0; border: 0; overflow-x: auto; scrollbar-width: none; }
    .bf-header-row2 .bf-stat { flex-direction: row; align-items: baseline; gap: 6px; padding: 0 16px; border-left-color: rgba(127,127,127,.25); }
    .bf-header-row2 .bf-stat:first-child { padding-left: 0; }
    .bf-header-row2 .bf-stat-label { font-size: 10.5px; color: var(--bf-hw-muted); }
    .bf-header-row2 .bf-stat-value { font-size: 14px; color: var(--bf-hw-text); }
    .bf-header-row2 .bf-stat-value.bf-s-bad { color: var(--bf-red); }
    .bf-header-row2 .bf-stat-value.bf-s-ok { color: var(--bf-green); }
    .bf-header-row2 .bf-stat-value em { color: var(--bf-hw-muted); }
    .app.app-header-fixed.app-with-top-menu .app-top-menu { top: 96px; }
    .app.app-header-fixed.app-with-top-menu { padding-top: 142px; }
    .app.app-header-fixed:not(.app-with-top-menu) { padding-top: 96px; }
}

/* Row 2: stats + refund centered; row 1: balances centered between logo and actions */
@media (min-width: 768px) {
    .bf-header-row2 { justify-content: center; gap: 20px; height: 44px; }
    .bf-header-row2 .btn-group .btn { height: 32px; --bs-btn-padding-y: 0; font-size: 13px; }
    .app.app-header-fixed.app-with-top-menu .app-top-menu { top: 104px; }
    .app.app-header-fixed.app-with-top-menu { padding-top: 150px; }
    .app.app-header-fixed:not(.app-with-top-menu) { padding-top: 104px; }
    .app-header > .navbar-nav { flex: 1 1 auto; justify-content: flex-end; }
    .app-header > .navbar-nav > .navbar-item.bf-wallet-item:first-child, .app-header > .navbar-nav > .bf-wallet-first { margin-left: auto; }
    .app-header > .navbar-nav > .bf-wallet-last { margin-right: auto; }
}
.bf-wallets-center { align-items: center; margin-left: auto; margin-right: auto; }
@media (min-width: 1440px) { .app-header { position: fixed; } .bf-wallets-center { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); margin: 0; } }

/* Row 2 now holds balances + stats; refund sits next to Emprunter */
@media (min-width: 768px) {
    .bf-header-row2 { height: 52px; gap: 18px; }
    .bf-header-row2 .bf-wallets-center { position: static !important; transform: none !important; margin: 0 !important; gap: 6px; }
    .bf-header-row2 .navbar-link.bf-hw { height: 38px; color: var(--bf-hw-text); text-decoration: none; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 4px; border-radius: 999px; background: var(--bf-hw-bg); }
    .bf-header-row2 .navbar-link.bf-hw:hover { background: var(--bf-hw-bg-hover); }
    .bf-header-row2 .navbar-link.bf-hw::after { display: none; }
    .app.app-header-fixed.app-with-top-menu .app-top-menu { top: 112px; }
    .app.app-header-fixed.app-with-top-menu { padding-top: 158px; }
    .app.app-header-fixed:not(.app-with-top-menu) { padding-top: 112px; }
    .bf-header-refund .btn { height: 38px; }
}
@media (min-width: 768px) and (max-width: 1199.98px) { .bf-header-row2 .bf-hw-split { display: none; } .bf-header-row2 { gap: 10px; } }

/* Row 2: Bifton blue gradient, light text */
@media (min-width: 768px) {
    .bf-header-row2 {
        background: linear-gradient(90deg, #14365e 0%, #2f74c0 55%, #3d8bdb 100%) !important;
        border-top: 0;
        --bf-hw-bg: rgba(255,255,255,.14); --bf-hw-bg-hover: rgba(255,255,255,.24); --bf-hw-muted: rgba(255,255,255,.72); --bf-hw-text: #fff;
    }
    .bf-header-row2 .bf-stat { border-left-color: rgba(255,255,255,.25) !important; }
    .bf-header-row2 .bf-stat-label { color: rgba(255,255,255,.72) !important; }
    .bf-header-row2 .bf-stat-value { color: #fff !important; }
    .bf-header-row2 .bf-stat-value.bf-s-bad { color: #ffb3b5 !important; }
    .bf-header-row2 .bf-stat-value.bf-s-ok { color: #8ff0b5 !important; }
    .bf-header-row2 .bf-stat-value em { color: rgba(255,255,255,.7) !important; }
    .bf-header-row2 .bf-ring { background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255,255,255,.3) 0); }
    .bf-header-row2 .bf-hw-split { border-left-color: rgba(255,255,255,.25); }
}

/* Row 1 buttons: one shared shape */
.app-header .bf-header-btn2, .app-header .bf-header-cta, .app-header .bf-header-refund .btn {
    height: 38px !important; border-radius: 999px !important; padding: 0 16px !important;
    font-size: 13.5px !important; font-weight: 700 !important; letter-spacing: 0 !important;
    display: inline-flex !important; align-items: center; box-shadow: none !important; border: 0 !important;
}
.app-header .bf-header-refund .btn-group > .btn:first-child { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; padding-right: 12px !important; }
.app-header .bf-header-refund .btn-group > .bf-split { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; padding: 0 12px !important; border-left: 1px solid rgba(255,255,255,.45) !important; }
.app-header .bf-header-refund .btn-group { border-radius: 999px; }

/* Softer row-2 gradient */
@media (min-width: 768px) { .bf-header-row2 { background: linear-gradient(90deg, #2a66aa 0%, #3577c2 100%) !important; } }

/* Score colour: red (0) -> orange -> green (100) */
.bf-stat-score .bf-stat-value { color: hsl(var(--bf-score-h), 70%, 38%) !important; }
.bf-stat-score .bf-ring { background: conic-gradient(hsl(var(--bf-score-h), 70%, 45%) calc(var(--p) * 1%), rgba(127,127,127,.2) 0) !important; }
.bf-header-row2 .bf-stat-score .bf-stat-value { color: hsl(var(--bf-score-h), 85%, 75%) !important; }
.bf-header-row2 .bf-stat-score .bf-ring { background: conic-gradient(hsl(var(--bf-score-h), 85%, 70%) calc(var(--p) * 1%), rgba(255,255,255,.3) 0) !important; }

/* Row 2: light Bifton blue, dark text */
@media (min-width: 768px) {
    .bf-header-row2 {
        background: #eaf2fb !important; border-top: 1px solid #d6e4f5; border-bottom: 1px solid #d6e4f5;
        --bf-hw-bg: #fff; --bf-hw-bg-hover: #f3f7fc; --bf-hw-muted: #5b6b80; --bf-hw-text: #14365e;
    }
    .bf-header-row2 .navbar-link.bf-hw { box-shadow: 0 0 0 1px #d6e4f5; }
    .bf-header-row2 .bf-stat { border-left-color: #c9dbf1 !important; }
    .bf-header-row2 .bf-stat-label { color: #5b6b80 !important; }
    .bf-header-row2 .bf-stat-value { color: #14365e !important; }
    .bf-header-row2 .bf-stat-value.bf-s-bad { color: #d93a3f !important; }
    .bf-header-row2 .bf-stat-value.bf-s-ok { color: #15803d !important; }
    .bf-header-row2 .bf-stat-value em { color: #5b6b80 !important; }
    .bf-header-row2 .bf-hw-split { border-left-color: #d6e4f5; }
    .bf-header-row2 .bf-stat-score .bf-stat-value { color: hsl(var(--bf-score-h), 75%, 36%) !important; }
    .bf-header-row2 .bf-stat-score .bf-ring { background: conic-gradient(hsl(var(--bf-score-h), 75%, 42%) calc(var(--p) * 1%), #c9dbf1 0) !important; }
}

/* Darker score colours; slightly darker card header band */
.bf-stat-score .bf-stat-value, .bf-header-row2 .bf-stat-score .bf-stat-value { color: hsl(var(--bf-score-h), 80%, 28%) !important; }
.bf-stat-score .bf-ring, .bf-header-row2 .bf-stat-score .bf-ring { background: conic-gradient(hsl(var(--bf-score-h), 80%, 33%) calc(var(--p) * 1%), #c9dbf1 0) !important; }
.bf-card > .card-header { background: #dce9f8 !important; border-bottom-color: #c6d9f0 !important; }

/* Tighter content padding */
.app-without-sidebar .app-content { padding: 16px 20px !important; }
.bf-titlebar { margin-bottom: 16px; }
@media (max-width: 767.98px) { .app-without-sidebar .app-content { padding: 12px !important; } }
.app-without-sidebar .app-content { padding-left: 10px !important; padding-right: 10px !important; } @media (max-width: 767.98px) { .app-without-sidebar .app-content { padding-left: 8px !important; padding-right: 8px !important; } }
.bf-card > .card-body { padding-bottom: 14px !important; }

/* Light, rounded table frame with soft row/column lines */
table.dataTable.bf-table {
    border-collapse: separate !important; border-spacing: 0;
    border: 1px solid #e3ebf5 !important; border-radius: 12px; overflow: hidden;
}
.bf-table thead th { border-radius: 0 !important; background: #f4f8fd !important; border-bottom: 1px solid #e3ebf5 !important; }
.bf-table > tbody > tr > td, .bf-table > tbody > tr > th { border-bottom: 1px solid #eef3f9 !important; border-top: 0 !important; }
.bf-table > thead > tr > th + th, .bf-table > tbody > tr > td + td, .bf-table > tbody > tr > td + th, .bf-table > tbody > tr > th + td { border-left: 1px solid #f1f5fa; }
.bf-table > tbody > tr:last-child > td, .bf-table > tbody > tr:last-child > th { border-bottom: 0 !important; }
.bf-table > tbody > tr:hover > * { background-color: #f7faff !important; }
.bf-card .card-body > .dataTables_wrapper, .bf-card .card-body .dataTables_wrapper { padding: 0 12px; }
table.dataTable.bf-table { box-sizing: border-box; } .bf-table > tbody > tr > td:first-child, .bf-table > thead > tr > th:first-child { padding-left: 42px !important; position: relative; }
table.dataTable.nowrap.bf-table td:has(a[href^="account-"]), table.dataTable.nowrap.bf-table th:has(a[href^="account-"]) { white-space: normal !important; min-width: 160px; }
/* Deadlines: small dotted leader between date and amount */
.bf-dl > span { position: relative; min-width: 0 !important; display: inline-flex; align-items: center; }
.bf-dl > span::after { content: ""; display: inline-block; width: 18px; margin: 0 8px; border-bottom: 2px dotted #b8cde6; transform: translateY(1px); }
.bf-dl { gap: 0 !important; }
.bf-dl > i { margin-left: 6px; }
.bf-dl > span::after { width: 8px; margin: 0 6px; border-bottom-width: 2px; }

/* ---------- Loan request detail ---------- */
.bf-rq-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.bf-rq-kpi { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid #e3ebf5; border-radius: 12px; background: #fbfdff; min-width: 0; }
.bf-rq-big { font-family: var(--bf-display); font-size: 20px; font-weight: 700; color: var(--bs-emphasis-color); white-space: nowrap; }
.bf-rq-big em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--bs-secondary-color); font-family: var(--bs-font-sans-serif); }
.bf-rq-score .bf-table .progress { margin: 4px 0 0; }
.bf-rq-notes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.bf-rq-notes:empty { display: none; }
.bf-rq-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.bf-rq-actions .btn { border-radius: 999px; font-weight: 700; padding: 7px 16px; }
.bf-rq-actions:empty { display: none; }
.bf-dlist { display: grid; grid-template-columns: minmax(130px, 38%) 1fr; gap: 0; margin: 0; }
.bf-dlist dt, .bf-dlist dd { padding: 9px 0; margin: 0; border-bottom: 1px solid #eef3f9; font-size: 13.5px; }
.bf-dlist dt { color: var(--bs-secondary-color); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.bf-dlist dd { color: var(--bs-emphasis-color); font-weight: 500; }
.bf-dlist dt:nth-last-child(2), .bf-dlist dd:last-child { border-bottom: 0; }
.bf-schedule { display: flex; flex-direction: column; gap: 4px; }
.bf-schedule .bf-dl { font-size: 13.5px; }
.bf-profile ul { padding-left: 18px; margin: 0; }
.bf-profile li { padding: 3px 0; font-size: 13.5px; }
.bf-trx table { width: 100%; font-size: 13px; }
.bf-trx table td, .bf-trx table th { padding: 8px 10px; border-bottom: 1px solid #eef3f9; }
.bf-rq-schedule { margin-top: 14px; padding: 12px 14px; border: 1px solid #e3ebf5; border-radius: 12px; background: #fbfdff; }
.bf-rq-schedule > .bf-stat-label { display: block; margin-bottom: 8px; }
.bf-rq-schedule .bf-schedule { flex-direction: row; flex-wrap: wrap; gap: 6px 28px; }
/* Schedule as a tile in the key-figures row */
.bf-rq-kpis { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 10px; }
.bf-rq-kpi { padding: 10px 12px; }
.bf-rq-big { font-size: 18px; }
.bf-rq-kpi.bf-rq-schedule { margin-top: 0; grid-column: span 2; }
.bf-rq-kpi.bf-rq-schedule > .bf-stat-label { margin-bottom: 2px; }
.bf-rq-kpi.bf-rq-schedule .bf-schedule { flex-direction: column; gap: 1px; }
.bf-rq-kpi.bf-rq-schedule .bf-dl { font-size: 12.5px; margin: 0; }
@media (max-width: 575.98px) { .bf-rq-kpi.bf-rq-schedule { grid-column: 1 / -1; } }

/* ---------- Recommendations ---------- */
.bf-reco-intro { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.bf-reco-intro > p { flex: 1 1 calc(100% - 64px); color: var(--bs-body-color); font-size: 13.5px; }
.bf-reco-search { flex: 1 1 100%; max-width: 420px; margin-left: 64px; }
@media (max-width: 575.98px) { .bf-reco-search { margin-left: 0; max-width: none; } }
.bf-reco-search .iti, .bf-reco-search .form-control { width: 100%; }
.bf-reco-search .form-control { height: 40px; border-radius: 999px; }
.bf-reco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.bf-reco { margin: 0; }
.bf-reco-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #c6d9f0; flex: 0 0 36px; }
.bf-reco > .card-header h5 { padding-left: 0 !important; font-size: 14px; margin: 0; min-width: 0; }
.bf-reco > .card-header h5::before { display: none; }
.bf-reco-line { margin: 0 0 8px; font-size: 13px; line-height: 1.45; }
.bf-reco-line.is-ok { color: #15803d; font-weight: 600; }
.bf-reco-line.is-ko { color: #c62828; font-weight: 600; }
.bf-reco star-rating-comp { display: block; margin-top: 4px; }
.bf-reco-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; }
.bf-reco-actions .btn { border-radius: 999px; font-weight: 700; padding: 6px 14px; font-size: 13px; }
.bf-reco .star-rating, .bf-reco star-rating-comp > div { text-align: left; justify-content: flex-start; }

/* ---- Dashboard ---- */
.bf-dash-bar .card-body { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px !important; }
.bf-dash-bar .date-picker { max-width: 300px; border-radius: 999px; font-weight: 600; }
.bf-dash-sec { margin-bottom: 24px; }
.bf-sec-title { display: flex; align-items: center; gap: 10px; font-family: Sora, sans-serif; font-size: 16px; font-weight: 700; margin: 8px 0 12px; }
.bf-sec-title > span { width: 4px; height: 18px; border-radius: 4px; background: #2f74c0; }
.bf-dash-cyan .bf-sec-title > span { background: #0ea5b7; }
.bf-sec-sub { font-family: Sora, sans-serif; font-size: 14px; font-weight: 700; margin: 8px 0 10px; color: #475569; }
.bf-kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 16px; }
.bf-kpi { position: relative; background: #fff; border: 1px solid #e3eaf3; border-radius: 14px; padding: 10px 12px 10px 50px; min-height: 64px; display: flex; flex-direction: column; justify-content: center; }
.bf-kpi-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 8px; background: #dce9f8; color: #2f74c0; display: grid; place-items: center; font-size: 13px; }
.bf-kpi-cyan .bf-kpi-ic { background: #d9f3f6; color: #0e8a99; }
.bf-kpi-l { font-size: 11px; color: #64748b; line-height: 1.25; text-transform: uppercase; letter-spacing: .02em; }
.bf-kpi-v { font-family: Sora, sans-serif; font-size: 17px; font-weight: 700; color: #0f172a; margin-top: 2px; }
.bf-chart-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; margin-bottom: 16px; }
.bf-chart-card { margin: 0; min-width: 0; }
.bf-chart-card .card-body { padding: 12px 16px 16px !important; }
.bf-chart-wrap { position: relative; min-width: 0; }
@media (max-width: 575.98px) { .bf-chart-grid { grid-template-columns: 1fr; } .bf-kpi-grid { grid-template-columns: 1fr 1fr; } .bf-dash-bar .date-picker { max-width: none; } }
/* Dashboard: more airy tiles */
.bf-kpi-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 20px; }
.bf-kpi { padding: 16px 18px 16px 70px; min-height: 92px; border-radius: 16px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.bf-kpi-ic { left: 18px; width: 38px; height: 38px; border-radius: 11px; font-size: 16px; }
.bf-kpi-l { font-size: 13px; text-transform: none; letter-spacing: 0; color: #475569; font-weight: 600; }
.bf-kpi-v { font-size: 22px; margin-top: 4px; line-height: 1.2; }
.bf-kpi-skel { display: block; height: 22px; width: 60%; margin-top: 6px; border-radius: 6px; background: linear-gradient(90deg,#eef2f7 25%,#dde5ef 50%,#eef2f7 75%); background-size: 200% 100%; animation: bfSkel 1.2s linear infinite; }
@keyframes bfSkel { to { background-position: -200% 0; } }
.bf-sec-title { font-size: 18px; margin: 12px 0 14px; }
@media (max-width: 575.98px) { .bf-kpi-grid { grid-template-columns: 1fr; } .bf-kpi-v { font-size: 20px; } }

/* ---- Profile (smartWizard) ---- */
.bf-profile { --sw-anchor-active-primary-color: #2f74c0; --sw-anchor-done-primary-color: #9cc0e8; --sw-toolbar-btn-background-color: #2f74c0; }
#smartwizard.bf-profile .bf-steps { justify-content: center; gap: 8px; border: 0 !important; margin-bottom: 8px; flex-wrap: wrap; }
#smartwizard.bf-profile .bf-steps .nav-link { display: flex !important; align-items: center; gap: 10px; padding: 10px 18px 10px 10px !important; border-radius: 999px; background: #f1f5f9 !important; color: #475569 !important; font-weight: 600; font-size: 14px; height: auto !important; border: 0 !important; }
#smartwizard.bf-profile .bf-steps .nav-link::after { display: none !important; }
#smartwizard.bf-profile .bf-steps .nav-link .num { position: static !important; display: grid !important; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; color: #64748b; font-family: Sora, sans-serif; font-size: 13px; border: 0 !important; margin: 0 !important; }
#smartwizard.bf-profile .bf-steps .nav-link.active { background: #2f74c0 !important; color: #fff !important; }
#smartwizard.bf-profile .bf-steps .nav-link.active .num { color: #2f74c0; }
#smartwizard.bf-profile .bf-steps .nav-link.done { background: #dce9f8 !important; color: #2f74c0 !important; }
.bf-profile .toolbar { text-align: center !important; padding: 8px 0 14px !important; }
.bf-profile .toolbar .btn { border-radius: 999px !important; padding: 7px 18px !important; font-weight: 600; }
.bf-profile > .tab-content { border: 0 !important; padding: 24px 16px !important; height: auto !important; }
.bf-form { width: 100% !important; max-width: 720px; margin: 0 auto !important; }
.bf-form > tbody > tr, .bf-form > thead > tr { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 16px; border-bottom: 1px solid #eef2f7; padding: 10px 0; }
.bf-form > thead > tr { grid-template-columns: 1fr 1fr auto; }
.bf-form td, .bf-form th { border: 0 !important; padding: 0 !important; width: auto !important; }
.bf-form td.field { font-weight: 600; color: #334155; font-size: 14px; }
.bf-form .form-control, .bf-form select { border-radius: 10px; min-height: 40px; }
.bf-form .form-control:disabled { background: #f8fafc; }
.bf-form .input-group { flex-wrap: nowrap; }
.bf-form .input-group .btn { border-radius: 0 10px 10px 0; }
.bf-req { color: #dc3545; margin-left: 3px; }
.bf-avatar { width: 112px; height: 112px; object-fit: cover; border-radius: 50%; border: 4px solid #dce9f8; }
.bf-profile .profile-left { margin-bottom: 12px; }
.bf-id-img { display: block; width: 100%; max-height: 200px; object-fit: contain; border-radius: 12px; border: 1px solid #e3eaf3; background: #f8fafc; margin-bottom: 10px; }
.bf-profile-foot { margin-top: 16px; }
.bf-profile-foot .btn-primary { border-radius: 999px; padding: 9px 28px; font-weight: 600; }
@media (max-width: 767.98px) {
  .bf-form > tbody > tr { grid-template-columns: 1fr; gap: 6px; }
  .bf-profile .bf-steps .nav-link { font-size: 0 !important; padding: 6px !important; gap: 0; }
  .bf-profile .bf-steps .nav-link .num { font-size: 13px; }
  .bf-profile .bf-steps .nav-link i { display: none; }
}
#smartwizard.bf-profile .bf-steps::before, #smartwizard.bf-profile .bf-steps .nav-link::before { display: none !important; content: none !important; }
#smartwizard.bf-profile .bf-steps .nav-link.active .num { background: #fff !important; color: #2f74c0 !important; }
.bf-form .form-control, .bf-form select, .bf-form .iti { width: 100% !important; max-width: none !important; }
.bf-form .btn-outline-primary { margin-top: 8px; }
#smartwizard.bf-profile .bf-steps { flex-direction: row !important; margin-top: -12px; }
#smartwizard.bf-profile .bf-steps .nav-item { flex: 0 0 auto !important; width: auto !important; }
@media (max-width: 767.98px) { #smartwizard.bf-profile .bf-steps { margin-top: 0; } #smartwizard.bf-profile .bf-steps .nav-link { width: auto !important; } }

/* Profile v2: identity card + tabs */
.bf-prof-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.bf-prof-aside { position: sticky; top: calc(var(--bf-sticky-top, 170px)); }
.bf-prof-aside .card-body { text-align: center; padding: 24px 20px !important; }
.bf-prof-aside .profile-image { margin-bottom: 8px; }
.bf-prof-aside .m-10 { margin: 6px 0 0 !important; display: flex; gap: 6px; justify-content: center; }
.bf-prof-name { font-family: Sora, sans-serif; font-size: 18px; font-weight: 700; margin: 10px 0 2px; }
.bf-prof-phone { color: #64748b; font-size: 14px; }
.bf-prof-status { margin: 12px 0 4px; }
.bf-prof-status .bf-pill { display: inline-flex; gap: 6px; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.bf-prof-status .is-ok { background: #dcfce7; color: #15803d; }
.bf-prof-status .is-ko { background: #fee2e2; color: #b91c1c; }
.bf-prof-status .is-wait { background: #fef3c7; color: #b45309; }
.bf-prof-facts { list-style: none; padding: 14px 0 0; margin: 14px 0 0; border-top: 1px solid #eef2f7; text-align: left; }
.bf-prof-facts li { display: flex; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; color: #334155; word-break: break-word; }
.bf-prof-facts i { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 8px; background: #dce9f8; color: #2f74c0; font-size: 12px; }
/* tabs: underline */
#smartwizard.bf-profile { background: #fff; border-radius: 18px; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06); overflow: hidden; }
#smartwizard.bf-profile .bf-steps { justify-content: flex-start; gap: 0; margin: 0 !important; padding: 0 12px; border-bottom: 1px solid #e5ebf2 !important; background: #f6f9fd; flex-wrap: nowrap; overflow-x: auto; }
#smartwizard.bf-profile .bf-steps .nav-link { background: none !important; border-radius: 0; padding: 16px 16px 14px !important; color: #64748b !important; border-bottom: 3px solid transparent !important; white-space: nowrap; }
#smartwizard.bf-profile .bf-steps .nav-link .num { display: none !important; }
#smartwizard.bf-profile .bf-steps .nav-link.active { background: none !important; color: #2f74c0 !important; border-bottom-color: #2f74c0 !important; }
#smartwizard.bf-profile .bf-steps .nav-link.done { background: none !important; color: #334155 !important; }
#smartwizard.bf-profile .bf-steps .nav-link.done::after { content: "\f00c" !important; display: inline !important; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 11px; color: #16a34a; position: static !important; margin-left: 4px; width: auto; height: auto; background: none; }
#smartwizard.bf-profile > .tab-content { box-shadow: none; border-radius: 0; padding: 24px 24px 8px !important; }
#smartwizard.bf-profile .toolbar { text-align: right !important; padding: 12px 24px 20px !important; border-top: 1px solid #eef2f7; }
/* forms in 2 columns, label above */
.bf-form { max-width: none; }
.bf-form > tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.bf-form > tbody > tr { display: flex; flex-direction: column; align-items: stretch; gap: 6px; border: 0; padding: 0; }
.bf-form td.field { font-size: 13px; }
.bf-form > thead > tr { border: 0; padding: 0 0 12px; }
.bf-profile-foot { margin: 16px 0 0; }
.bf-profile-foot > [class^="col-lg-"] { flex: 0 0 100%; max-width: 100%; }
@media (max-width: 991.98px) { .bf-prof-layout { grid-template-columns: 1fr; } .bf-prof-aside { position: static; } }
@media (max-width: 767.98px) {
  .bf-form > tbody { grid-template-columns: 1fr; }
  #smartwizard.bf-profile .bf-steps .nav-link { font-size: 13px !important; padding: 14px 10px 12px !important; gap: 6px; }
  #smartwizard.bf-profile .bf-steps .nav-link i { display: inline-block; }
  #smartwizard.bf-profile > .tab-content { padding: 16px !important; }
}
.bf-prof-status .bf-pill::before { display: none !important; }
#smartwizard.bf-profile { padding: 0 !important; }
#smartwizard.bf-profile .bf-steps { padding-top: 0 !important; }
#smartwizard.bf-profile > .tab-content { border-top: 0 !important; }

/* Profile: Mobile Money accounts */
.bf-momo-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.bf-momo-head h5 { font-family: Sora, sans-serif; font-weight: 700; }
.bf-momo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-bottom: 12px; }
.bf-momo { display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 16px; border: 1px solid #e3eaf3; border-radius: 14px; background: #fff; flex-wrap: wrap; }
.bf-momo-ic { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px; display: grid; place-items: center; background: #dce9f8; color: #2f74c0; font-size: 18px; }
.bf-momo-ic.is-orange { background: #ffedd5; color: #ea580c; }
.bf-momo-ic.is-mtn { background: #fef9c3; color: #a16207; }
.bf-momo-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.bf-momo-main b { font-family: Sora, sans-serif; font-size: 16px; color: #0f172a; }
.bf-momo-main small { color: #64748b; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.bf-st { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.bf-st.is-ok { background: #dcfce7; color: #15803d; }
.bf-st.is-ko { background: #fee2e2; color: #b91c1c; }
.bf-st.is-wait { background: #fef3c7; color: #b45309; }
.bf-momo-admin { flex-basis: 100%; display: flex; gap: 16px; padding-left: 56px; }
.bf-momo-del { width: 34px; height: 34px; padding: 0; border-radius: 10px; color: #94a3b8; background: transparent; border: 0; }
.bf-momo-del:not(:disabled):hover { background: #fee2e2; color: #b91c1c; }
.bf-momo-del:disabled { opacity: .35; }
@media (max-width: 575.98px) { .bf-momo-list { grid-template-columns: 1fr; } .bf-momo-admin { padding-left: 0; } }
#smartwizard.bf-profile .bf-steps { scrollbar-width: none; }
#smartwizard.bf-profile .bf-steps::-webkit-scrollbar { display: none; }

/* ---- Admin tabbed lists (accounts / requests management) ---- */
.bf-tabs-card { overflow: hidden; }
.bf-tabs-head { background: #f6f9fd; border-bottom: 1px solid #e5ebf2; }
.bf-tabs-scroll { overflow-x: auto; scrollbar-width: none; }
.bf-tabs-scroll::-webkit-scrollbar { display: none; }
.bf-utabs { flex-wrap: nowrap; border: 0 !important; padding: 0 12px; gap: 4px; }
.bf-utabs .nav-link { border: 0 !important; border-bottom: 3px solid transparent !important; border-radius: 0 !important; background: none !important; color: #64748b !important; font-weight: 600; font-size: 14px; padding: 14px 14px 12px !important; white-space: nowrap; }
.bf-utabs .nav-link:hover { color: #2f74c0 !important; }
.bf-utabs .nav-link.active { color: #2f74c0 !important; border-bottom-color: #2f74c0 !important; }
.bf-count { display: inline-block; min-width: 22px; padding: 1px 7px; margin-left: 6px; border-radius: 999px; background: #e2e8f0; color: #475569; font-size: 11px; font-weight: 700; text-align: center; }
.bf-utabs .nav-link.active .bf-count { background: #2f74c0; color: #fff; }
.bf-tabs-card > .tab-content { padding: 12px 8px 8px !important; }
.bf-ibtn { width: 32px; height: 32px; padding: 0 !important; border-radius: 10px !important; display: inline-grid; place-items: center; font-size: 13px; border: 1px solid #e3eaf3 !important; background: #fff; color: #475569; margin: 1px; }
.bf-ibtn:hover { background: #f1f5f9; }
.bf-ibtn.is-primary { color: #2f74c0; background: #eaf2fb; border-color: #d4e4f6 !important; }
.bf-ibtn.is-dark { color: #334155; }
.bf-ibtn.is-ok { color: #15803d; background: #ecfdf3; border-color: #ccefd9 !important; }
.bf-ibtn.is-danger { color: #b91c1c; background: #fef2f2; border-color: #fbd5d5 !important; }
.bf-tabs-card .bf-table .progress { height: 16px; border-radius: 999px; min-width: 90px; margin: 0; font-size: 11px; }
.bf-tabs-card .bf-table tr.locked td { background: #fff7ed; }
.bf-utabs .nav-item, .bf-utabs .nav-item.active { background: none !important; }
.bf-tabs-card .bf-utabs .nav-item .nav-link, .bf-tabs-card .bf-utabs .nav-item .nav-link.active { background: transparent !important; background-color: transparent !important; }
.bf-tabs-card .bf-table td { vertical-align: middle; }

/* ---- Admin lists v2: side filters + rich list ---- */
.bf-adm-split { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.bf-side { position: sticky; top: var(--bf-sticky-top, 170px); }
.bf-side .card-body { padding: 14px 10px !important; }
.bf-side-title { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; font-weight: 700; margin: 2px 10px 8px; }
.bf-vtabs { gap: 2px; border: 0; }
.bf-vtabs .nav-item { background: none !important; }
.bf-vtabs .nav-link { display: flex !important; align-items: center; gap: 10px; padding: 9px 10px !important; border-radius: 10px !important; color: #334155 !important; font-weight: 600; font-size: 14px; background: none !important; border: 0 !important; }
.bf-vtabs .nav-link > i { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 8px; background: #f1f5f9; color: #64748b; font-size: 12px; }
.bf-vtabs .nav-link > span { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bf-vtabs .nav-link:hover { background: #f6f9fd !important; }
.bf-vtabs .nav-link.active { background: #eaf2fb !important; color: #2f74c0 !important; }
.bf-vtabs .nav-link.active > i { background: #2f74c0; color: #fff; }
.bf-vtabs .bf-count { margin-left: auto; }
.bf-vtabs .nav-link.active .bf-count { background: #2f74c0; color: #fff; }
.bf-split-main { padding: 8px 8px 4px !important; min-width: 0; }
.bf-split-main .bf-table thead th { background: transparent !important; border-bottom: 1px solid #eef2f7 !important; }
.bf-split-main .bf-table td { vertical-align: middle; border-left: 0 !important; border-right: 0 !important; }
.bf-split-main .bf-table tbody tr:hover td { background: #f8fbff; }
.bf-uid { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bf-uav { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; display: grid; place-items: center; background: #dce9f8; color: #2f74c0; font-family: Sora, sans-serif; font-weight: 700; font-size: 14px; text-transform: uppercase; }
.bf-uid-main { display: flex; flex-direction: column; min-width: 0; white-space: normal; }
.bf-uid-main b { font-size: 14px; color: #0f172a; text-transform: capitalize; }
.bf-uid-main small { color: #64748b; font-size: 12px; word-break: break-all; }
.bf-chk { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #fef2f2; color: #f87171; font-size: 11px; margin-right: 2px; }
.bf-chk.is-on { background: #ecfdf3; color: #16a34a; }
@media (max-width: 991.98px) {
  .bf-adm-split { grid-template-columns: 1fr; }
  .bf-side { position: static; }
  .bf-vtabs { flex-direction: row !important; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .bf-vtabs .nav-link { white-space: nowrap; }
  .bf-side-title { display: none; }
}
.bf-uid-main small { word-break: normal; overflow-wrap: anywhere; }

/* Row actions: text button + overflow menu */
.bf-actions { text-align: right !important; white-space: nowrap; }
.bf-abtn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px !important; border-radius: 999px !important; font-size: 13px; font-weight: 600; color: #2f74c0; background: #eaf2fb; border: 0 !important; }
.bf-abtn:hover { background: #d8e7f8; color: #245d9d; }
.bf-abtn.is-ok { color: #15803d; background: #ecfdf3; } .bf-abtn.is-ok:hover { background: #d7f5e3; }
.bf-abtn.is-ko { color: #b91c1c; background: #fef2f2; } .bf-abtn.is-ko:hover { background: #fde2e2; }
.bf-kebab { width: 32px; height: 32px; padding: 0 !important; border-radius: 50% !important; color: #64748b; background: transparent; border: 0 !important; margin-left: 2px; }
.bf-kebab:hover, .bf-kebab.show { background: #f1f5f9; color: #0f172a; }
.bf-menu { min-width: 200px; padding: 6px !important; border: 1px solid #e5ebf2 !important; border-radius: 12px !important; box-shadow: 0 12px 32px rgba(16,24,40,.12) !important; z-index: 1060; }
.bf-menu .dropdown-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 14px; font-weight: 500; color: #334155; }
.bf-menu .dropdown-item i { width: 16px; text-align: center; color: #64748b; }
.bf-menu .dropdown-item:hover { background: #f1f5f9; }
.bf-menu .dropdown-item.is-danger, .bf-menu .dropdown-item.is-danger i { color: #dc2626; }
.bf-menu .dropdown-item.is-danger:hover { background: #fef2f2; }
.bf-menu .dropdown-divider { margin: 4px 0; }
.bf-kebab, .bf-abtn { box-shadow: none !important; } .bf-kebab::after { display: none !important; }

/* Admin lists v3: horizontal status tabs on top, full-width table (one card) */
.bf-adm-split { display: block; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06); border-radius: 18px; background: #fff; }
.bf-side { position: static; box-shadow: none !important; border-radius: 18px 18px 0 0 !important; background: #f6f9fd; border-bottom: 1px solid #e5ebf2 !important; }
.bf-side .card-body { padding: 8px 10px !important; }
.bf-vtabs { flex-direction: row !important; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 4px; }
.bf-vtabs::-webkit-scrollbar { display: none; }
.bf-vtabs .nav-link { white-space: nowrap; padding: 7px 12px 7px 8px !important; font-size: 13px; }
.bf-vtabs .nav-link > i { width: 24px; height: 24px; flex-basis: 24px; font-size: 11px; }
.bf-vtabs .nav-link.active { background: #fff !important; box-shadow: 0 1px 3px rgba(16,24,40,.08); }
.bf-split-main { box-shadow: none !important; border-radius: 0 0 18px 18px !important; padding: 8px 4px 4px !important; }

/* Admin lists: compact columns — the first column takes the free space, the others fit their content */
.bf-split-main .bf-table { table-layout: auto !important; }
.bf-split-main .bf-table > thead > tr > th, .bf-split-main .bf-table > tbody > tr > td { padding: 10px 12px !important; }
.bf-split-main .bf-table > thead > tr > th:not(:first-child), .bf-split-main .bf-table > tbody > tr > td:not(:first-child) { width: 1% !important; white-space: nowrap; }
.bf-split-main .bf-table > thead > tr > th:first-child, .bf-split-main .bf-table > tbody > tr > td:first-child { width: auto !important; }
.bf-split-main .bf-table tbody td .progress { width: 110px; min-width: 110px; }
.bf-split-main .bf-table .bf-chk { margin-right: 0; }
.bf-split-main .bf-table th.sorting, .bf-split-main .bf-table th.sorting_asc, .bf-split-main .bf-table th.sorting_desc { padding-right: 26px !important; }
.bf-split-main .bf-table.dtr-inline.collapsed > tbody > tr > td.dtr-control, .bf-split-main .bf-table.dtr-inline > tbody > tr > td:first-child { padding-left: 42px !important; }
/* Admin lists: separate phone/email columns, one icon button per action */
.bf-mono { font-variant-numeric: tabular-nums; color: #334155; }
.bf-mail { color: #2f74c0; text-decoration: none; } .bf-mail:hover { text-decoration: underline; }
.bf-actions { text-align: right !important; }
.bf-actions .bf-ibtn { width: 32px; height: 32px; margin: 0 1px; box-shadow: none !important; }
.bf-ibtn.is-warn { color: #b45309; background: #fffbeb; border-color: #fde9b8 !important; }
.bf-ibtn:hover { filter: brightness(.96); }
.bf-split-main .bf-table:not(:has(.bf-uid)) > thead > tr > th, .bf-split-main .bf-table:not(:has(.bf-uid)) > tbody > tr > td { width: auto !important; }

/* DataTables sort icons: Glyphicons font is not loaded any more, use Font Awesome */
body table.dataTable thead tr th.sorting, body table.dataTable thead tr th.sorting_asc, body table.dataTable thead tr th.sorting_desc { position: relative; cursor: pointer; padding-right: 26px !important; }
body table.dataTable thead tr th.sorting::after, body table.dataTable thead tr th.sorting_asc::after, body table.dataTable thead tr th.sorting_desc::after {
  font-family: "Font Awesome 6 Free" !important; font-weight: 900; content: "\f0dc" !important; opacity: .35 !important;
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%); bottom: auto; font-size: 11px; color: #64748b; display: block !important;
}
body table.dataTable thead tr th.sorting_asc::after { content: "\f0de" !important; opacity: 1 !important; color: #2f74c0; }
body table.dataTable thead tr th.sorting_desc::after { content: "\f0dd" !important; opacity: 1 !important; color: #2f74c0; }
body table.dataTable thead tr th.sorting:hover::after { opacity: .7 !important; }
body table.dataTable thead tr th::before { display: none !important; }
/* Centered action buttons */
.bf-actions, .bf-adm-split .bf-table th:last-child { text-align: center !important; }
.bf-ibtn { display: inline-flex !important; align-items: center !important; justify-content: center !important; vertical-align: middle; } .bf-ibtn > i { margin: 0 !important; line-height: 1; }

/* Single-list admin pages (campaigns, financial operations) */
.bf-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px !important; background: #f6f9fd !important; border-bottom: 1px solid #e5ebf2 !important; border-radius: 18px 18px 0 0 !important; }
.bf-list-head h5 { display: flex; align-items: center; gap: 10px; font-family: Sora, sans-serif; font-size: 16px; font-weight: 700; margin: 0; }
.bf-list-head h5 > i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: #2f74c0; color: #fff; font-size: 13px; }
.bf-list-card > .card-body { padding: 8px 4px 4px !important; }
.bf-list-card .bf-table td { vertical-align: middle; }
.bf-list-card .bf-table tr.locked td { background: #fafafa; color: #94a3b8; }
.bf-strong { color: #0f172a; font-weight: 700; }
.bf-uav.is-comm { border-radius: 12px; font-size: 14px; }
.bf-actions .bf-ibtn { min-width: 32px; flex: 0 0 32px; }
.bf-list-head::before { display: none !important; }
.bf-list-card .bf-table td.bf-actions, .bf-list-card .bf-table th:last-child { width: 1%; white-space: nowrap; }
.bf-list-head h5::before { display: none !important; }
table.dataTable.nowrap td.bf-wrap { white-space: normal !important; min-width: 140px; max-width: 240px; }
.bf-list-head h5 .bf-count { margin-left: 2px; }
.bf-list-card.is-muted .bf-list-head { background: #f8fafc !important; }
.bf-list-card.is-muted .bf-list-head h5 > i { background: #94a3b8; }
.bf-list-card.is-muted .bf-table td { color: #64748b; }

/* ---- Campaign stats page ---- */
.bf-cmp-head .card-body { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px !important; }
.bf-cmp-title { display: flex; flex-direction: column; min-width: 0; }
.bf-cmp-title small { color: #64748b; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.bf-cmp-title h4 { font-family: Sora, sans-serif; font-weight: 700; margin: 0; font-size: 20px; }
.bf-cmp-actions { margin-left: auto; display: flex; gap: 4px; }
.bf-cmp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; align-items: start; }
.bf-cmp-target { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #f6f9fd; font-size: 13px; }
.bf-cmp-target h6 { font-weight: 700; font-size: 13px; color: #2f74c0; margin-bottom: 6px; }
.bf-cmp-target ul { margin: 0; padding-left: 18px; }
.bf-exec { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-bottom: 1px solid #eef2f7; }
.bf-exec:last-child { border-bottom: 0; }
.bf-exec-n { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; display: grid; place-items: center; background: #dce9f8; color: #2f74c0; font-family: Sora, sans-serif; font-weight: 700; font-size: 12px; }
.bf-exec-main { flex: 1; min-width: 0; }
.bf-exec-main b { font-size: 14px; color: #0f172a; }
.bf-exec-bar { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.bf-exec-bar .progress { flex: 1; height: 8px; border-radius: 999px; background: #eef2f7; margin: 0; }
.bf-exec-bar .progress-bar { background: #2f74c0; border-radius: 999px; }
.bf-exec-bar small { color: #64748b; font-size: 12px; white-space: nowrap; }
@media (max-width: 991.98px) { .bf-cmp-grid { grid-template-columns: 1fr; } }
.bf-dlist > div { display: contents; }

/* Recommendations: intro + small stats panel on the right */
.bf-reco-top { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: stretch; }
.bf-reco-top > .card { margin: 0; }
.bf-reco-stats .card-body { padding: 14px 16px !important; }
.bf-rs-main { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid #eef2f7; margin-bottom: 4px; }
.bf-rs-main span { font-size: 12px; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.bf-rs-main b { font-family: Sora, sans-serif; font-size: 22px; color: #2f74c0; }
.bf-reco-stats ul { list-style: none; margin: 0; padding: 0; }
.bf-reco-stats li { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13px; color: #334155; }
.bf-reco-stats li i { width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; border-radius: 7px; background: #dce9f8; color: #2f74c0; font-size: 11px; }
.bf-reco-stats li span { flex: 1; }
.bf-reco-stats li b { font-family: Sora, sans-serif; font-size: 14px; color: #0f172a; }
.bf-reco-stats li.is-warn i { background: #fef3c7; color: #b45309; }
.bf-reco-stats li.is-warn b { color: #b45309; }
@media (max-width: 991.98px) { .bf-reco-top { grid-template-columns: 1fr; } }
.bf-reco-top .bf-reco-intro { align-content: center; row-gap: 12px; height: 100%; }

/* ---- Affichage (blacklist) ---- */
.bf-page-icon.is-danger { background: #fef2f2; color: #dc2626; }
.bf-bl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.bf-bl { margin: 0; overflow: hidden; border-top: 4px solid #94a3b8 !important; }
.bf-bl.is-p2 { border-top-color: #16a34a !important; } .bf-bl.is-p3 { border-top-color: #f59e0b !important; } .bf-bl.is-p4 { border-top-color: #dc2626 !important; }
.bf-bl.is-masked { opacity: .75; background: #f6fbf7; }
.bf-bl-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px 0; }
.bf-bl-phase { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 3px 10px; border-radius: 999px; background: #f1f5f9; color: #475569; }
.is-p2 .bf-bl-phase { background: #dcfce7; color: #15803d; } .is-p3 .bf-bl-phase { background: #fef3c7; color: #b45309; } .is-p4 .bf-bl-phase { background: #fee2e2; color: #b91c1c; }
.bf-bl-trx { font-size: 12px; font-weight: 700; color: #2f74c0; text-decoration: none; }
.bf-bl-id { display: flex; align-items: center; gap: 14px; padding: 14px 16px 8px; }
.bf-bl-pic { position: relative; flex: 0 0 76px; }
.bf-bl-pic img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 3px solid #dce9f8; background: #f1f5f9; }
.bf-bl-pic .bf-ibtn { position: absolute; right: -6px; bottom: -4px; width: 26px !important; height: 26px !important; min-width: 26px; flex-basis: 26px; font-size: 10px; background: #fff; }
.bf-bl-name { display: flex; flex-direction: column; min-width: 0; }
.bf-bl-name b { font-family: Sora, sans-serif; font-size: 16px; text-transform: uppercase; color: #0f172a; line-height: 1.25; }
.bf-bl-name small { color: #64748b; font-size: 12px; text-transform: uppercase; margin-top: 2px; }
.bf-bl-pay { padding: 4px 16px 6px; }
.bf-bl-pay small { color: #64748b; font-size: 12px; }
.bf-bl-pay .progress { height: 8px; border-radius: 999px; background: #fee2e2; margin-top: 4px; }
.bf-bl-pay .progress-bar { background: #16a34a; border-radius: 999px; }
.bf-bl .bf-dlist { padding: 0 16px; }
.bf-bl-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 14px; }
.bf-bl-tags:empty { display: none; }
.bf-st.is-dark { background: #1e293b; color: #fff; }
.bf-bl-foot { padding: 0 16px 16px; }
@media (max-width: 575.98px) { .bf-bl-grid { grid-template-columns: 1fr; } }

/* ---- Settings ---- */
.bf-set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.bf-set { margin: 0; }
.bf-set-desc { color: #475569; font-size: 13.5px; margin-bottom: 16px; }
.bf-set-sub { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #2f74c0; margin: 18px 0 10px; }
.bf-set-field { margin-bottom: 12px; }
.bf-set-field .form-label { font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 4px; }
.bf-set-field .form-control { border-radius: 10px 0 0 10px; min-height: 40px; }
.bf-set-field .input-group-text { border-radius: 0 10px 10px 0; font-weight: 600; font-size: 12px; background: #f6f9fd; }
.bf-set-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; margin: 10px 0 0 6px; padding: 14px 14px 2px; border-left: 3px solid #dce9f8; background: #f8fbff; border-radius: 0 12px 12px 0; }
.bf-switch { display: flex; align-items: center; gap: 10px; padding: 10px 0 10px 0; margin: 0; border-bottom: 1px solid #eef2f7; }
.bf-switch:last-of-type { border-bottom: 0; }
.bf-switch .form-check-input { width: 2.4em; height: 1.3em; margin: 0; flex: 0 0 auto; float: none; cursor: pointer; }
.bf-switch .form-check-input:checked { background-color: #2f74c0; border-color: #2f74c0; }
.bf-switch .form-check-label { font-size: 14px; color: #334155; cursor: pointer; }
.bf-set-foot { background: #f8fafc !important; border-top: 1px solid #eef2f7 !important; padding: 12px 16px !important; text-align: right; border-radius: 0 0 18px 18px !important; }
@media (max-width: 991.98px) { .bf-set-grid { grid-template-columns: 1fr; } }
@media (max-width: 575.98px) { .bf-set-filters { grid-template-columns: 1fr; } }

/* ---- Testimonials ---- */
.bf-page-icon.is-ok { background: #ecfdf3; color: #16a34a; }
.bf-tst-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.bf-tst-main, .bf-tst-side { margin: 0; }
.bf-tst-main > .card-body { padding: 16px !important; }
.bf-tst-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.bf-tst { position: relative; padding: 14px 16px; border: 1px solid #e3eaf3; border-radius: 14px; background: #fff; }
.bf-tst.is-mine { background: #f6f9fd; border-color: #d4e4f6; margin-bottom: 14px; }
.bf-tst-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.bf-tst-who { font-size: 12px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: .02em; }
.bf-tst blockquote { position: relative; margin: 8px 0 0; padding-left: 22px; font-size: 14px; line-height: 1.5; color: #334155; font-style: italic; }
.bf-tst blockquote::before { content: "\201C"; position: absolute; left: 0; top: -8px; font-family: Sora, serif; font-size: 34px; color: #9cc0e8; font-style: normal; }
.bf-tst-actions { display: flex; gap: 6px; margin-top: 10px; }
.bf-tst-side { position: sticky; top: var(--bf-sticky-top, 170px); }
.bf-tst-side .card-body { max-height: 70vh; overflow-y: auto; padding: 8px 16px !important; }
.bf-thx { padding: 10px 0; border-bottom: 1px solid #eef2f7; }
.bf-thx:last-child { border-bottom: 0; }
.bf-thx-id { font-size: 11px; font-weight: 700; color: #2f74c0; text-decoration: none; }
.bf-thx p { margin: 2px 0 0; font-size: 13px; color: #334155; }
@media (max-width: 991.98px) { .bf-tst-layout { grid-template-columns: 1fr; } .bf-tst-side { position: static; } }

/* Change password: live rules */
.bf-pw-rules { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.bf-pw-rules li, .bf-pw-match { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #94a3b8; }
.bf-pw-rules li.is-ok, .bf-pw-match.is-ok { color: #16a34a; }
.bf-pw-match { margin-top: 6px; color: #dc2626; }
@media (max-width: 575.98px) { .bf-pw-rules { grid-template-columns: 1fr; } }

/* ---- Terms & conditions ---- */
.bf-terms-head { margin-bottom: 16px; }
.bf-terms-back { font-size: 13px; font-weight: 600; color: #2f74c0; text-decoration: none; }
.bf-terms-head h1 { font-family: Sora, sans-serif; font-weight: 700; font-size: 26px; margin: 6px 0 0; }
.bf-terms { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; padding-bottom: 40px; }
.bf-toc { position: sticky; top: var(--bf-sticky-top, 170px); margin: 0; max-height: calc(100vh - 200px); overflow-y: auto; }
.bf-toc .card-body { padding: 14px 10px !important; }
.bf-toc h6 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #64748b; margin: 0 8px 8px; }
.bf-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.bf-toc li { counter-increment: toc; }
.bf-toc a { display: flex; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: 13px; color: #334155; text-decoration: none; line-height: 1.3; }
.bf-toc a::before { content: counter(toc, upper-roman); min-width: 26px; font-weight: 700; color: #94a3b8; font-size: 11px; padding-top: 1px; }
.bf-toc a:hover { background: #f6f9fd; }
.bf-toc a.active { background: #eaf2fb; color: #2f74c0; font-weight: 600; }
.bf-toc a.active::before { color: #2f74c0; }
.bf-terms-sec { background: #fff; border-radius: 18px; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06); padding: 20px 24px; margin-bottom: 14px; scroll-margin-top: calc(var(--bf-sticky-top, 170px) + 10px); }
.bf-terms-sec h3 { font-family: Sora, sans-serif; font-size: 17px; font-weight: 700; color: #0f172a; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid #eef2f7; }
.bf-terms-sec h5 { font-size: 14.5px; font-weight: 700; color: #2f74c0; margin: 16px 0 6px; }
.bf-terms-sec p, .bf-terms-sec li { font-size: 14px; line-height: 1.65; color: #334155; margin-bottom: 8px; text-align: justify; }
.bf-terms-sec ul { padding-left: 20px; }
@media (max-width: 991.98px) { .bf-terms { grid-template-columns: 1fr; } .bf-toc { position: static; max-height: none; } }
@media (max-width: 575.98px) { .bf-terms-sec { padding: 16px; } .bf-terms-sec p, .bf-terms-sec li { text-align: left; } }

/* Change password v2: form + security panel */
.bf-pw { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); max-width: 980px; margin: 0 auto; overflow: hidden; }
.bf-pw-form { padding: 28px 32px; }
.bf-pw-form h4 { font-family: Sora, sans-serif; font-weight: 700; font-size: 20px; margin: 0 0 6px; }
.bf-pw-intro { color: #64748b; font-size: 13.5px; margin-bottom: 22px; }
.bf-pw-form .form-label { font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 5px; }
.bf-pw-form .form-control { min-height: 44px; border-radius: 12px; }
.bf-pw-submit { min-height: 46px; }
.bf-pw-side { background: linear-gradient(180deg, #eef5fd, #f8fbff); border-left: 1px solid #e3eaf3; padding: 28px 26px; display: flex; flex-direction: column; gap: 18px; }
.bf-pw-side-head { display: flex; align-items: center; gap: 12px; }
.bf-pw-side-head b { font-family: Sora, sans-serif; font-size: 16px; color: #0f172a; }
.bf-pw-shield { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: #2f74c0; color: #fff; font-size: 18px; }
.bf-pw-strength span { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #64748b; }
.bf-pw-strength b { font-size: 13px; color: #94a3b8; }
.bf-pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 6px; }
.bf-pw-meter i { height: 6px; border-radius: 999px; background: #dbe4ef; }
.lvl-1 .bf-pw-meter i:nth-child(-n+1) { background: #dc2626; } .lvl-1 b { color: #dc2626; }
.lvl-2 .bf-pw-meter i:nth-child(-n+2) { background: #f59e0b; } .lvl-2 b { color: #d97706; }
.lvl-3 .bf-pw-meter i:nth-child(-n+3) { background: #2f74c0; } .lvl-3 b { color: #2f74c0; }
.lvl-4 .bf-pw-meter i { background: #16a34a; } .lvl-4 b { color: #16a34a; }
.bf-pw-side .bf-pw-rules { grid-template-columns: 1fr; gap: 8px; margin: 0; }
.bf-pw-side .bf-pw-rules li { font-size: 13.5px; color: #64748b; }
.bf-pw-side .bf-pw-rules li.is-ok { color: #15803d; }
.bf-pw-tip { margin: auto 0 0; font-size: 12.5px; color: #475569; background: #fff; border: 1px solid #e3eaf3; border-radius: 12px; padding: 10px 12px; }
.bf-pw-tip i { color: #f59e0b; }
@media (max-width: 767.98px) { .bf-pw { grid-template-columns: 1fr; } .bf-pw-side { border-left: 0; border-top: 1px solid #e3eaf3; } .bf-pw-form, .bf-pw-side { padding: 20px; } }

/* ===================== Modals (ui-bootstrap) — shared skin ===================== */
.modal-content { border: 0 !important; border-radius: 20px !important; box-shadow: 0 24px 64px rgba(15,23,42,.22) !important; overflow: hidden; }
.modal-backdrop { background: #0f172a; }
.modal-header { background: #f6f9fd; border-bottom: 1px solid #e5ebf2 !important; padding: 16px 22px !important; display: flex; align-items: center; gap: 10px; }
.modal-header .modal-title { font-family: Sora, sans-serif; font-weight: 700; font-size: 17px; color: #0f172a; margin: 0; display: flex; align-items: center; gap: 10px; }
.modal-header .modal-title::before { content: ""; width: 4px; height: 18px; border-radius: 4px; background: #2f74c0; flex: 0 0 4px; }
.modal-header .close, .modal-header .btn-close { margin-left: auto; opacity: .5; }
.modal-body { padding: 20px 22px !important; font-size: 14px; color: #334155; }
.modal-body .form-inline { display: flex !important; flex-wrap: wrap; align-items: flex-start; margin: 0 -8px; }
.modal-body .form-inline > [class*="col-"] { padding: 0 8px; margin-bottom: 12px !important; }
.modal-body .control-label, .modal-body .form-label, .modal-body label.f-w-600 { font-size: 12.5px !important; font-weight: 600 !important; color: #475569; margin-bottom: 5px !important; display: block; }
.modal-body .form-control, .modal-body .form-select, .modal-body select.form-control { border-radius: 10px !important; min-height: 42px; border-color: #d9e2ec; font-size: 14px; }
.modal-body textarea.form-control { min-height: 84px; }
.modal-body .form-control:focus, .modal-body .form-select:focus { border-color: #2f74c0; box-shadow: 0 0 0 3px rgba(47,116,192,.15); }
.modal-body .border-red, .modal-body .form-control.border-red { border-color: #f5b4b4 !important; background: #fffafa; }
.modal-body .input-group .form-control { border-radius: 10px 0 0 10px !important; }
.modal-body .input-group-text { border-radius: 0 10px 10px 0 !important; background: #f6f9fd; font-weight: 600; font-size: 12px; border-color: #d9e2ec; }
.modal-body .table { font-size: 13px; margin-bottom: 0; }
.modal-body .table > thead > tr > th { background: #f6f9fd !important; color: #64748b; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #e5ebf2 !important; }
.modal-body .table td, .modal-body .table th { border-color: #eef2f7 !important; vertical-align: middle; }
.modal-body .table-bordered { border: 1px solid #e5ebf2; border-radius: 12px; overflow: hidden; border-collapse: separate; border-spacing: 0; }
.modal-body .alert { border-radius: 12px; border: 0; font-size: 13px; }
.modal-body .note, .modal-body .well { border-radius: 12px; }
.modal-footer { background: #f8fafc; border-top: 1px solid #eef2f7 !important; padding: 12px 22px !important; gap: 8px; }
.modal-footer .btn { border-radius: 999px !important; padding: 8px 20px; font-weight: 600; }
.modal-footer .btn-white, .modal-footer .btn-default { background: #fff; border: 1px solid #d9e2ec !important; color: #334155; }
.modal-body .btn-inverse, .modal-body .btn-dark { background: #eaf2fb !important; color: #2f74c0 !important; border: 0 !important; border-radius: 999px !important; }
.modal-body .badge, .modal-body .label { border-radius: 999px; font-weight: 700; }
@media (max-width: 575.98px) { .modal-dialog { margin: 8px; } .modal-body, .modal-header, .modal-footer { padding-left: 16px !important; padding-right: 16px !important; } }
/* modal: account checkbox lists as chips, inner panels as soft boxes */
.modal-body .col-lg-12:has(> .checkbox.checkbox-css + .checkbox.checkbox-css) { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-body .col-lg-12:has(> .checkbox.checkbox-css + .checkbox.checkbox-css) > label { flex: 0 0 100%; }
.modal-body .checkbox.checkbox-css { margin: 0 !important; padding: 0; }
.modal-body .col-lg-12 > .checkbox.checkbox-css label { display: inline-flex !important; align-items: center; gap: 4px; padding: 7px 12px 7px 34px !important; border: 1px solid #d9e2ec; border-radius: 999px; background: #fff; font-size: 13px !important; font-weight: 500 !important; color: #334155; cursor: pointer; margin: 0 !important; }
.modal-body .col-lg-12 > .checkbox.checkbox-css label::before { left: 12px !important; top: 50% !important; transform: translateY(-50%); margin: 0 !important; }
.modal-body .col-lg-12 > .checkbox.checkbox-css label::after { left: 12px !important; top: 50% !important; transform: translateY(-50%); margin: 0 !important; }
.modal-body .col-lg-12 > .checkbox.checkbox-css input:checked + label { border-color: #2f74c0; background: #eaf2fb; color: #2f74c0; }
.modal-body .panel { border: 1px solid #e5ebf2 !important; border-radius: 14px !important; box-shadow: none !important; overflow: hidden; background: #fff; }
.modal-body .panel > .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #f6f9fd !important; color: #0f172a !important; border-bottom: 1px solid #e5ebf2; padding: 10px 14px !important; }
.modal-body .panel > .panel-heading .panel-title { font-size: 13px !important; font-weight: 700; color: #0f172a !important; margin: 0; }
.modal-body .panel > .panel-heading .btn { width: 30px; height: 30px; padding: 0 !important; display: inline-grid; place-items: center; }
.modal-body .panel > .panel-body { padding: 10px 12px !important; }
.modal-body .panel .table-bordered { border: 0; }
/* chips v2: the whole .checkbox is the pill, native checkbox inside */
.modal-body .col-lg-12 > .checkbox.checkbox-css { display: inline-flex !important; align-items: center; gap: 8px; padding: 7px 12px !important; border: 1px solid #d9e2ec; border-radius: 999px; background: #fff; }
.modal-body .col-lg-12 > .checkbox.checkbox-css:has(input:checked) { border-color: #2f74c0; background: #eaf2fb; }
.modal-body .col-lg-12 > .checkbox.checkbox-css:has(input:disabled) { opacity: .5; }
.modal-body .col-lg-12 > .checkbox.checkbox-css input { position: static !important; opacity: 1 !important; margin: 0 !important; width: 16px; height: 16px; accent-color: #2f74c0; }
.modal-body .col-lg-12 > .checkbox.checkbox-css label { padding: 0 !important; border: 0 !important; background: none !important; display: inline !important; }
.modal-body .col-lg-12 > .checkbox.checkbox-css label::before, .modal-body .col-lg-12 > .checkbox.checkbox-css label::after { display: none !important; }
.modal-body .col-lg-12 > .checkbox.checkbox-css:has(input:checked) label { color: #2f74c0; }
/* modal deadlines: date and amount side by side */
.modal-body td:has(> p.input-group + input) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; border-left: 0 !important; }
.modal-body td:has(> p.input-group + input) > p.input-group { margin: 0 !important; flex-wrap: nowrap; }
.modal-body td > p.input-group .btn { border-radius: 0 10px 10px 0 !important; border: 1px solid #d9e2ec; background: #f6f9fd; height: 42px; }
.modal-body .table td.vmiddle:first-child { width: 36px; text-align: center; font-weight: 700; color: #2f74c0; font-family: Sora, sans-serif; }
.modal-body .btn-danger.btn-xs { width: 30px; height: 30px; padding: 0 !important; border-radius: 10px !important; background: #fef2f2 !important; color: #b91c1c !important; border: 1px solid #fbd5d5 !important; display: inline-grid; place-items: center; }
.modal-body .btn-danger.btn-xs:disabled { opacity: .35; }
.modal-body hr { border-color: #eef2f7; opacity: 1; margin: 6px 0 14px; }
.modal-body .progress { height: 14px; border-radius: 999px; font-size: 10.5px; }
@media (max-width: 575.98px) { .modal-body td:has(> p.input-group + input) { grid-template-columns: 1fr; } }
/* Bids list modal */
.bf-bids { display: flex; flex-direction: column; gap: 14px; }
.bf-bid { border: 1px solid #e3eaf3; border-radius: 16px; padding: 14px 16px; background: #fff; }
.bf-bid.is-ok { border-color: #bfe8cf; background: #fbfefc; }
.bf-bid.is-ko { opacity: .7; }
.bf-bid-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.bf-bid-who { display: block; font-family: Sora, sans-serif; font-weight: 700; font-size: 15px; color: #0f172a; text-transform: uppercase; text-decoration: none; }
.bf-bid-head small { color: #64748b; font-size: 12px; }
.bf-bid-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.bf-bid-kpis > div { background: #f6f9fd; border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; }
.bf-bid-kpis span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; color: #64748b; font-weight: 600; line-height: 1.2; }
.bf-bid-kpis b { font-family: Sora, sans-serif; font-size: 15px; color: #0f172a; margin-top: 3px; }
.bf-bid-kpis .is-hl { background: #eaf2fb; } .bf-bid-kpis .is-hl b { color: #2f74c0; }
.bf-bid-dl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.bf-bid-dl-t { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #64748b; margin-right: 4px; }
.bf-bid-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.bf-bid-actions:empty { display: none; }
.bf-bid-actions select { flex: 1 1 220px; margin: 0 !important; }
.bf-bid-actions .btn-circle { border-radius: 999px !important; padding: 8px 16px !important; font-weight: 600; }
.bf-bid-actions p { margin: 0 !important; }
@media (max-width: 575.98px) { .bf-bid-kpis { grid-template-columns: 1fr 1fr; } }
.bf-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde9b8; color: #92400e; font-size: 13px; margin-top: 6px; }
.bf-note > i { color: #f59e0b; margin-top: 2px; }
/* Debt acknowledgement letter */
.bf-letter { position: relative; background: #fff; border: 1px solid #e3eaf3; border-left: 4px solid #2f74c0; border-radius: 14px; padding: 18px 20px; font-size: 13.5px; line-height: 1.6; color: #1e293b; box-shadow: inset 0 0 0 1px #fff, 0 6px 20px rgba(15,23,42,.05); margin-bottom: 14px; }
.bf-letter h3, .bf-letter h4, .bf-letter .text-center u, .bf-letter u { text-decoration: none; }
.bf-letter > :first-child, .bf-letter p:first-child { font-family: Sora, sans-serif; }
/* Datepicker popups must not be clipped inside modals */
.modal-content { overflow: visible !important; }
.modal-content > .modal-header { border-radius: 20px 20px 0 0; }
.modal-content > .modal-footer { border-radius: 0 0 20px 20px; }
.modal-body .panel, .modal-body .table-bordered, .modal-body .table-responsive { overflow: visible !important; }
.uib-datepicker-popup.dropdown-menu { z-index: 1080 !important; display: block; border: 1px solid #e5ebf2 !important; border-radius: 14px !important; box-shadow: 0 16px 40px rgba(15,23,42,.18) !important; padding: 8px !important; }
.uib-datepicker-popup .btn { border-radius: 8px !important; }
.uib-datepicker-popup .btn-info, .uib-datepicker-popup .active .btn, .uib-datepicker-popup .btn.active { background: #2f74c0 !important; color: #fff !important; border-color: #2f74c0 !important; }
.uib-datepicker-popup .uib-button-bar { display: flex; justify-content: space-between; gap: 6px; padding: 8px 4px 2px !important; }
.uib-datepicker-popup .uib-button-bar .btn { color: #334155 !important; background: #f1f5f9 !important; border: 1px solid #e2e8f0 !important; font-size: 12px; padding: 4px 10px; }
.uib-datepicker-popup .uib-button-bar .btn-info { background: #eaf2fb !important; color: #2f74c0 !important; }
.uib-datepicker-popup .uib-button-bar .btn-danger { background: #fef2f2 !important; color: #b91c1c !important; }
.uib-datepicker-popup .uib-button-bar .btn-success { background: #2f74c0 !important; color: #fff !important; border-color: #2f74c0 !important; }
.uib-datepicker-popup .uib-button-bar .btn-group { display: flex; gap: 6px; }
.bf-modal-x { margin-left: auto; width: 34px; height: 34px; flex: 0 0 34px; border: 0; border-radius: 50%; background: transparent; color: #64748b; display: grid; place-items: center; font-size: 16px; cursor: pointer; transition: background .15s, color .15s; }
.bf-modal-x:hover { background: #e2e8f0; color: #0f172a; }
.modal-header { position: relative; }
.modal-header .modal-title { flex: 1 1 auto; min-width: 0; }

/* Modal open/close: soft zoom + fade, blurred backdrop (ui-bootstrap toggles .in) */
.modal-backdrop { -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@media (prefers-reduced-motion: reduce) {
  .modal.fade, .modal.fade .modal-dialog, .modal-backdrop.fade { transition: none !important; }
}
.modal.bf-leaving { pointer-events: none; }

/* Modal motion v2: visible as soon as inserted (no wait for ui-bootstrap's .in), 120ms micro-zoom */
@keyframes bfModalIn { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
@keyframes bfModalOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(.98); } }
@keyframes bfFadeIn { from { opacity: 0; } to { opacity: .45; } }
@keyframes bfFadeOut { from { opacity: .45; } to { opacity: 0; } }
.modal.fade, .modal.fade.in, .modal.fade.show { opacity: 1 !important; transition: none !important; }
.modal.fade .modal-dialog, .modal.fade.in .modal-dialog, .modal.fade.show .modal-dialog { transform: none; transition: none !important; animation: bfModalIn .12s ease-out both; }
.modal.bf-leaving .modal-dialog { animation: bfModalOut .1s ease-in both !important; }
.modal-backdrop.fade, .modal-backdrop.fade.in, .modal-backdrop.fade.show { opacity: .45; transition: none !important; animation: bfFadeIn .12s ease-out both; }
.modal-backdrop.bf-leaving { animation: bfFadeOut .1s ease-in both !important; }
@media (prefers-reduced-motion: reduce) { .modal .modal-dialog, .modal-backdrop { animation: none !important; } }

/* Centered top menu (desktop) */
@media (min-width: 768px) {
  .app-top-menu .menu { justify-content: center; justify-content: safe center; }
}

/* Header row 2 slightly taller (+6px) */
@media (min-width: 768px) {
    .bf-header-row2 { height: 58px; }
    .app.app-header-fixed.app-with-top-menu .app-top-menu { top: 118px; }
    .app.app-header-fixed.app-with-top-menu { padding-top: 164px; }
    .app.app-header-fixed:not(.app-with-top-menu) { padding-top: 118px; }
}

/* ===================== Affinity Cash dashboard ===================== */
.bf-aff-intro .card-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; align-items: center; padding: 18px 20px !important; }
.bf-aff-intro__text { display: flex; gap: 14px; align-items: flex-start; }
.bf-aff-intro__text h5 { font-family: Sora, sans-serif; font-weight: 700; font-size: 16px; margin: 0 0 4px; }
.bf-aff-intro__text p { margin: 0; color: #475569; font-size: 13.5px; line-height: 1.55; }
.bf-aff-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bf-aff-steps li { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 12px 50px; border-radius: 14px; background: #f6f9fd; border: 1px solid #e5ebf2; }
.bf-aff-steps li > span { position: absolute; left: 12px; top: 12px; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: #2f74c0; color: #fff; font-family: Sora, sans-serif; font-weight: 800; font-size: 13px; }
.bf-aff-steps b { font-size: 13.5px; color: #0f172a; }
.bf-aff-steps small { font-size: 12px; color: #64748b; line-height: 1.4; }
.bf-aff-sec { margin-bottom: 24px; }
.bf-aff-sub { color: #64748b; font-size: 13.5px; margin: -6px 0 12px; }
.bf-aff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.bf-aff-elig { font-size: 13.5px; }

.bf-line, .bf-lender { margin: 0; border-top: 4px solid #f59e0b !important; }
.bf-line.is-s2 { border-top-color: #16a34a !important; }
.bf-lender { border-top-color: #2f74c0 !important; }
.bf-line .card-body, .bf-lender .card-body { padding: 16px 18px !important; }
.bf-line__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.bf-line__head small { display: block; font-size: 11.5px; color: #64748b; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.bf-line__head b { font-family: Sora, sans-serif; font-size: 15px; color: #0f172a; }

.bf-stepper { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.bf-stepper::before { content: ""; position: absolute; left: 16%; right: 16%; top: 14px; height: 2px; background: #e2e8f0; }
.bf-stepper li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; color: #94a3b8; font-weight: 600; text-align: center; }
.bf-stepper li i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid #e2e8f0; font-size: 12px; position: relative; z-index: 1; }
.bf-stepper li.is-done { color: #15803d; }
.bf-stepper li.is-done i { background: #16a34a; border-color: #16a34a; color: #fff; }

.bf-line__balance { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.bf-line__balance small { display: block; font-size: 12px; color: #64748b; font-weight: 600; }
.bf-line__balance b { font-family: Sora, sans-serif; font-size: 26px; color: #0f172a; line-height: 1.15; }
.bf-line__balance b.is-sm { font-size: 16px; color: #475569; }
.bf-line__balance em { font-style: normal; font-size: 13px; color: #64748b; font-weight: 700; }
.bf-line__bar { height: 8px; border-radius: 999px; background: #dcfce7; margin: 10px 0; overflow: hidden; }
.bf-line__bar i { display: block; height: 100%; background: #f59e0b; border-radius: 999px; }
.bf-line__ops { display: flex; flex-wrap: wrap; gap: 8px; }
.bf-line__ops span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: #f6f9fd; border: 1px solid #e5ebf2; font-size: 12.5px; color: #334155; }
.bf-line__ops img { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; }
.bf-line__exp, .bf-line__hint { margin: 12px 0 0; font-size: 12.5px; color: #64748b; display: flex; gap: 6px; align-items: baseline; }
.bf-line__hint { color: #92400e; background: #fffbeb; border: 1px solid #fde9b8; border-radius: 10px; padding: 8px 10px; }
.bf-line .bf-dlist { margin-top: 4px; }
.bf-line__foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #f8fafc !important; border-top: 1px solid #eef2f7 !important; padding: 10px 14px !important; border-radius: 0 0 18px 18px !important; }
.bf-line__foot .bf-ibtn { margin-left: 0; }
.bf-line__foot > :last-child.bf-ibtn { margin-left: auto; }

.bf-wds { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #e2e8f0; }
.bf-wds h6 { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #64748b; margin: 0 0 8px; }
.bf-wd { border: 1px solid #e5ebf2; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.bf-wd.is-late { border-color: #fbd5d5; background: #fffafa; }
.bf-wd__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.bf-wd__top b { font-family: Sora, sans-serif; }
.bf-wd__top small { color: #94a3b8; font-size: 11.5px; }
.bf-wd__dl { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.bf-wd__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.bf-abtn.is-soft { color: #475569; background: #f1f5f9; }

.bf-trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.bf-trust > div { background: #f6f9fd; border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; min-width: 0; }
.bf-trust b { font-family: Sora, sans-serif; font-size: 14px; color: #0f172a; }
.bf-trust span { font-size: 11px; color: #64748b; line-height: 1.3; }
.bf-lender__head { display: flex; gap: 12px; align-items: center; }
.bf-lender__head b { display: block; font-family: Sora, sans-serif; font-size: 15px; }
.bf-lender__head small { font-size: 12px; color: #64748b; }

@media (max-width: 991.98px) {
    .bf-aff-intro .card-body { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
    .bf-aff-steps { grid-template-columns: 1fr; }
    .bf-aff-grid { grid-template-columns: 1fr; }
    .bf-line__balance b { font-size: 22px; }
}

/* ===================== Affinity modals ===================== */
.bf-aff-modal .bf-wizard { display: flex; gap: 8px; margin-bottom: 16px; }
.bf-aff-modal .bf-wizard span { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: #f1f5f9; color: #64748b; font-size: 12.5px; font-weight: 700; }
.bf-aff-modal .bf-wizard span i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #fff; font-style: normal; font-size: 11px; }
.bf-aff-modal .bf-wizard span.is-on { background: #eaf2fb; color: #2f74c0; }
.bf-aff-modal .bf-wizard span.is-on i { background: #2f74c0; color: #fff; }
.bf-sim { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 6px; }
.bf-sim > div { border-radius: 14px; padding: 12px 14px; background: #f6f9fd; border: 1px solid #e5ebf2; }
.bf-sim > div.is-in { background: #ecfdf3; border-color: #ccefd9; }
.bf-sim small { display: block; font-size: 11.5px; color: #64748b; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.bf-sim b { font-family: Sora, sans-serif; font-size: 20px; color: #0f172a; }
.bf-sim span { font-size: 12px; color: #64748b; }
.bf-sim-note { font-size: 12px; color: #64748b; margin: 0 0 4px; }
.bf-fees { border: 1px solid #e5ebf2; border-radius: 12px; margin-top: 12px; background: #fff; }
.bf-fees summary { cursor: pointer; padding: 10px 14px; font-weight: 700; font-size: 13px; color: #2f74c0; list-style: none; display: flex; justify-content: space-between; }
.bf-fees summary::-webkit-details-marker { display: none; }
.bf-fees[open] summary i { transform: rotate(180deg); }
.bf-fees > div { padding: 0 14px 12px; font-size: 13px; color: #334155; }
.bf-fees ul { margin: 0 0 8px; padding-left: 18px; }
.bf-recap { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bf-recap > div { background: #f6f9fd; border-radius: 12px; padding: 10px 12px; }
.bf-recap small { display: block; font-size: 11.5px; color: #64748b; font-weight: 700; }
.bf-recap b { font-size: 14.5px; color: #0f172a; }
.bf-done { text-align: center; padding: 10px 0 4px; }
.bf-done i { font-size: 40px; color: #16a34a; }
.bf-done h5 { font-family: Sora, sans-serif; font-weight: 700; margin: 10px 0 6px; }
.bf-done p { color: #475569; font-size: 13.5px; margin: 0 auto; max-width: 420px; }
@media (max-width: 575.98px) { .bf-sim, .bf-recap { grid-template-columns: 1fr; } }
.bf-sec-title > span.bf-count { width: auto; height: auto; background: #e2e8f0; color: #475569; border-radius: 999px; }
.bf-wd__top small { display: inline-block; }

/* Affinity: compact credit-line rows */
.bf-rows { display: flex; flex-direction: column; gap: 12px; }
.bf-row { margin: 0; border-left: 4px solid #f59e0b !important; overflow: hidden; }
.bf-row.is-s2 { border-left-color: #16a34a !important; }
.bf-row__main { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.4fr) auto; gap: 20px; align-items: center; padding: 14px 18px; }
.bf-row__title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bf-row__title b { font-family: Sora, sans-serif; font-size: 15px; color: #0f172a; }
.bf-row__id small { display: block; margin-top: 4px; font-size: 12.5px; color: #64748b; }
.bf-row__nums { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.bf-row__nums small { width: 100%; font-size: 11.5px; color: #64748b; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.bf-row__nums b { font-family: Sora, sans-serif; font-size: 22px; color: #0f172a; line-height: 1.1; }
.bf-row__nums span { font-size: 13px; color: #64748b; font-weight: 600; }
.bf-row .bf-line__bar { margin: 8px 0 6px; }
.bf-row__ops { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: #475569; }
.bf-row__ops span { display: inline-flex; align-items: center; gap: 5px; }
.bf-row__ops img { width: 16px; height: 16px; border-radius: 4px; object-fit: cover; }
.bf-row__actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.bf-mini-steps { list-style: none; display: flex; gap: 6px; margin: 8px 0 0; padding: 0; flex-wrap: wrap; }
.bf-mini-steps li { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #f1f5f9; color: #94a3b8; }
.bf-mini-steps li.is-done { background: #dcfce7; color: #15803d; }
.bf-row__due { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; border-top: 1px solid #eef2f7; background: #f8fafc; padding: 9px 18px; font-size: 13px; color: #334155; text-align: left; cursor: pointer; }
.bf-row__due b { font-family: Sora, sans-serif; }
.bf-row__due.is-late { background: #fef2f2; color: #b91c1c; border-top-color: #fbd5d5; }
.bf-row__chev { margin-left: auto; transition: transform .15s; }
.bf-row__due.is-open .bf-row__chev { transform: rotate(180deg); }
.bf-row__wds { padding: 6px 18px 12px; background: #fff; border-top: 1px solid #eef2f7; }
.bf-wdrow { display: grid; grid-template-columns: minmax(150px, auto) 1fr auto; gap: 14px; align-items: center; padding: 8px 0; border-bottom: 1px dashed #e5ebf2; }
.bf-wdrow:last-child { border-bottom: 0; }
.bf-wdrow__id b { display: block; font-family: Sora, sans-serif; font-size: 14px; }
.bf-wdrow__id small { font-size: 11.5px; color: #94a3b8; }
.bf-wdrow__dl { display: flex; gap: 6px; flex-wrap: wrap; }
.bf-wdrow__actions { display: flex; gap: 6px; }
.bf-row__hint { margin: 0; padding: 8px 18px; font-size: 12.5px; color: #92400e; background: #fffbeb; border-top: 1px solid #fde9b8; }
@media (max-width: 991.98px) {
    .bf-row__main { grid-template-columns: 1fr 1fr; }
    .bf-row__actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 575.98px) {
    .bf-row__main { grid-template-columns: 1fr; gap: 12px; }
    .bf-wdrow { grid-template-columns: 1fr; gap: 6px; }
}
/* Affinity: breathing room + separators between sections */
.bf-aff > .bf-aff-intro { margin-bottom: 28px !important; }
.bf-aff .bf-aff-sec { margin: 0; padding: 26px 0 30px; }
.bf-aff .bf-aff-sec + .bf-aff-sec, .bf-aff .bf-aff-elig + .bf-aff-sec { border-top: 1px solid #e3eaf3; }
.bf-aff .bf-aff-sec:first-of-type { padding-top: 4px; }
.bf-aff .bf-aff-sec .bf-sec-title { margin-top: 0; margin-bottom: 16px; }
.bf-aff .bf-rows { gap: 16px; }
.bf-aff .bf-aff-grid { gap: 20px; }
.bf-aff .bf-aff-sec:first-of-type { padding-top: 22px; }
.bf-aff .bf-aff-elig + .bf-aff-sec { border-top: 0; padding-top: 4px; }

/* Pages without a title (force-change-password): no empty title row on desktop */
@media (min-width: 768px) { .bf-titlebar.is-bare { display: none !important; } }
.bf-titlebar.is-bare { margin-bottom: 8px; }
@media (min-width: 768px) { .bf-titlebar.is-bare ~ .bf-pw { margin-top: 28px; } }
/* Mask toggle lives in header row 2 (desktop/tablet) */
.bf-row2-mask { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #2f74c0; background: rgba(255,255,255,.7); border: 1px solid #d4e4f6; text-decoration: none; margin-left: 4px; transition: background .15s; }
.bf-row2-mask:hover { background: #fff; color: #245d9d; }
.bf-masked .bf-row2-mask { background: #2f74c0; color: #fff; border-color: #2f74c0; }

/* Header logo: transparent, no white badge */
.bf-logo { background: none !important; box-shadow: none !important; padding: 0 !important; border-radius: 0 !important; }
.bf-logo img { height: 34px; }
/* Profile: section separator inside the merged step, disabled rent row */
.bf-form > tbody > tr.bf-form-sep { display: block; grid-column: 1 / -1; padding: 18px 0 2px; border: 0; }
.bf-form > tbody > tr.bf-form-sep td { display: block; font-family: Sora, sans-serif; font-weight: 700; font-size: 14px; color: #2f74c0; text-transform: uppercase; letter-spacing: .04em; border-top: 1px solid #e3eaf3 !important; padding-top: 16px !important; }
.bf-form tr.bf-row-disabled { opacity: .5; }
.bf-form tr.bf-row-disabled .form-control { background: #f1f5f9; }

/* Profile: account validation card (admin / CEO / CRO) */
.bf-vcard { background: #fff; border-radius: 18px; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06); overflow: hidden; }
.bf-vcard__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 24px; background: #f6f9fd; border-bottom: 1px solid #e5ebf2; font-family: Sora, sans-serif; font-weight: 600; color: #1e3a5f; }
.bf-vcard__head i { color: #2f74c0; }
.bf-vcard__badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; background: #fff4e0; color: #b45309; border: 1px solid #fcd9a4; font-size: 12px; font-weight: 600; font-family: Manrope, sans-serif; }
.bf-vcard__body { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; padding: 20px 24px; }
.bf-vcard__field > label { display: block; font-weight: 600; font-size: 13px; color: #334155; margin-bottom: 6px; }
.bf-vcard__field--full { grid-column: 1 / -1; }
.bf-vcard__choice { display: flex; gap: 10px; }
.bf-vcard__choice input { position: absolute; opacity: 0; pointer-events: none; }
.bf-vcard__choice label { flex: 1; text-align: center; margin: 0; padding: 9px 12px; border: 1.5px solid #dbe3ee; border-radius: 10px; cursor: pointer; font-weight: 600; color: #64748b; transition: all .15s; }
.bf-vcard__choice label:hover { border-color: #b8c7da; }
.bf-vcard__choice input:checked + label.is-ok { background: #ecfdf3; border-color: #16a34a; color: #15803d; }
.bf-vcard__choice input:checked + label.is-ko { background: #fef2f2; border-color: #dc2626; color: #b91c1c; }
.bf-vcard__foot { padding: 12px 24px 18px; border-top: 1px solid #eef2f7; text-align: right; }
.bf-vcard__foot .btn-primary { border-radius: 999px; padding: 9px 28px; font-weight: 600; }
@media (max-width: 767.98px) { .bf-vcard__body { grid-template-columns: 1fr; padding: 16px; } .bf-vcard__head, .bf-vcard__foot { padding-left: 16px; padding-right: 16px; } }
/* Selects styled with .form-control (BS5 hides the native arrow): draw the chevron like .form-select */
select.form-control:not([multiple]):not([size]) {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right .85rem center; background-size: 12px 10px; padding-right: 2.25rem !important;
}
select.form-control:disabled { background-color: #f1f5f9; }

/* Corporate profile */
.bf-corp-badge { width: 88px; height: 88px; margin: 4px auto 10px; border-radius: 24px; display: grid; place-items: center; background: linear-gradient(135deg, #2f74c0, #1e4f8a); color: #fff; font-size: 36px; box-shadow: 0 8px 20px rgba(47,116,192,.25); }
.bf-corp-tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: #eaf2fb; color: #2f74c0; font-size: 12px; font-weight: 600; }
.bf-corp-owner { display: flex; align-items: center; gap: 12px; text-align: left; margin-top: 16px; padding-top: 16px; border-top: 1px solid #eef2f7; }
.bf-corp-owner .bf-avatar { width: 48px; height: 48px; flex: 0 0 48px; }
.bf-corp-owner small { display: block; color: #64748b; font-size: 11px; }
.bf-corp-owner b { display: block; color: #1e293b; }
.bf-corp-owner span { color: #64748b; font-size: 12px; }
.bf-selfie { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.bf-selfie > div { display: flex; gap: 6px; align-items: center; }
.bf-id-empty { display: grid; place-items: center; height: 120px; border: 1.5px dashed #cbd5e1; border-radius: 12px; background: #f8fafc; color: #94a3b8; font-size: 30px; margin-bottom: 10px; }
.bf-doc { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #e5ebf2; border-radius: 12px; background: #f8fafc; }
.bf-doc.is-set { background: #f0f7ff; border-color: #cfe1f5; }
.bf-doc__ic { font-size: 22px; color: #94a3b8; }
.bf-doc.is-set .bf-doc__ic { color: #dc2626; }
.bf-doc__main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-avatar--empty { display: inline-grid; place-items: center; background: #eef4fb; color: #9db4cf; font-size: 40%; }
.bf-avatar--empty i { font-size: 28px; }
.bf-corp-owner .bf-avatar--empty i { font-size: 20px; }
.bf-form > tbody > tr.bf-form-fill { visibility: hidden; }
@media (max-width: 767.98px) { .bf-form > tbody > tr.bf-form-fill { display: none; } }

/* Accounts list: corporate accounts */
.bf-uav.is-corp { background: linear-gradient(135deg, #2f74c0, #1e4f8a); color: #fff; }
.bf-st.is-corp { background: #eaf2fb; color: #2f74c0; border-color: #cfe1f5; }

/* Company roles (Affinity Home) */
.bf-roles { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.bf-role { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1.5px solid #dbe3ee; border-radius: 10px; cursor: pointer; font-weight: 600; color: #475569; margin: 0; }
.bf-role input { accent-color: #2f74c0; }
.bf-role:has(input:checked) { border-color: #2f74c0; background: #eaf2fb; color: #1e4f8a; }
.bf-prof-phone .bf-corp-tag.is-role { background: #fff4e0; color: #b45309; margin: 2px; }

/* Affinity Home (tenant) */
.bf-ah-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.bf-ah-grid .bf-ah-wide { grid-column: 1 / -1; }
.bf-ah-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.bf-ah-form.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bf-ah-form > label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13px; color: #334155; margin: 0; }
.bf-ah-form > label.is-wide { grid-column: span 2; }
.bf-ah-form .bf-form-sep-lite { grid-column: 1 / -1; font-family: Sora, sans-serif; font-weight: 700; font-size: 13px; color: #2f74c0; text-transform: uppercase; letter-spacing: .04em; border-top: 1px solid #e3eaf3; padding-top: 14px; margin-top: 4px; }
.bf-ah-lines { width: 100%; font-size: 14px; }
.bf-ah-lines td { padding: 6px 0; color: #475569; }
.bf-ah-lines td:last-child { text-align: right; font-family: Sora, sans-serif; color: #1e293b; white-space: nowrap; }
.bf-ah-lines tr.is-sub td { font-size: 12px; color: #94a3b8; padding-top: 0; }
.bf-ah-lines tr.is-strong td { font-weight: 700; color: #1e293b; }
.bf-ah-lines tr.is-sep td { padding: 4px 0; border-bottom: 1px dashed #e2e8f0; }
.bf-ah-lines tr.is-total td { font-weight: 800; font-size: 16px; color: #1e4f8a; padding-top: 10px; }
.bf-ah-effort { margin-top: 14px; }
.bf-ah-effort .progress { height: 6px; margin-top: 4px; }
.bf-note.is-ok { background: #ecfdf3; border-color: #bbf7d0; color: #166534; }
.bf-note.is-ko { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.bf-ah-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.bf-ah-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.bf-ah-head small { display: block; color: #64748b; font-weight: 500; }
.bf-ah-track { list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; padding: 0; margin: 0 0 18px; }
.bf-ah-track li { position: relative; text-align: center; font-size: 12px; color: #94a3b8; }
.bf-ah-track li::before { content: ""; position: absolute; top: 17px; left: -50%; right: 50%; height: 2px; background: #e2e8f0; z-index: 0; }
.bf-ah-track li:first-child::before { display: none; }
.bf-ah-track__dot { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 6px; background: #f1f5f9; color: #94a3b8; }
.bf-ah-track b { display: block; font-weight: 600; }
.bf-ah-track small { display: block; color: #64748b; margin-top: 2px; }
.bf-ah-track li.is-done { color: #15803d; } .bf-ah-track li.is-done::before { background: #86efac; }
.bf-ah-track li.is-done .bf-ah-track__dot { background: #dcfce7; color: #15803d; }
.bf-ah-track li.is-current { color: #1e4f8a; } .bf-ah-track li.is-current .bf-ah-track__dot { background: #2f74c0; color: #fff; box-shadow: 0 0 0 4px #dbeafe; }
.bf-ah-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.bf-ah-figures > div { background: #f6f9fd; border-radius: 12px; padding: 12px 14px; }
.bf-ah-figures small { display: block; color: #64748b; font-size: 12px; }
.bf-ah-figures b { font-family: Sora, sans-serif; font-size: 18px; color: #1e293b; }
.bf-ah-figures em { font-style: normal; color: #64748b; margin-left: 4px; font-size: 13px; }
.bf-ah-past { display: grid; grid-template-columns: 1.2fr 2fr auto; gap: 12px; align-items: center; padding: 12px 20px; border-top: 1px solid #eef2f7; font-size: 13px; }
.bf-ah-past:first-child { border-top: 0; }
@media (max-width: 991.98px) { .bf-ah-grid { grid-template-columns: 1fr; } .bf-ah-form.is-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bf-ah-track { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 16px; } .bf-ah-track li::before { display: none; } .bf-ah-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .bf-ah-form, .bf-ah-form.is-3 { grid-template-columns: 1fr; } .bf-ah-form > label.is-wide { grid-column: auto; } .bf-ah-past { grid-template-columns: 1fr; } }.bf-ah-form > label { display: block; }
.bf-ah-form > label > .form-control, .bf-ah-form > label > .input-group, .bf-ah-form > label > select { margin-top: 6px; }
.bf-ah-form > label > small { display: block; margin-top: 4px; font-weight: 400; }

/* Affinity Home: upfront payment */
.bf-ah-pay { border: 1px solid #cfe1f5; background: #f6f9fd; border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; }
.bf-ah-pay__head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.bf-ah-pay__head small { display: block; color: #64748b; max-width: 520px; }
.bf-ah-pay__amount { text-align: right; }
.bf-ah-pay__amount b { display: block; font-family: Sora, sans-serif; font-size: 20px; color: #1e4f8a; }
.bf-ah-pay__amount em { font-style: normal; font-size: 12px; color: #15803d; }
.bf-ah-wallets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.bf-ah-wallet { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid #dbe3ee; border-radius: 12px; background: #fff; cursor: pointer; margin: 0; }
.bf-ah-wallet input { accent-color: #2f74c0; }
.bf-ah-wallet img { width: 32px; height: 32px; object-fit: contain; }
.bf-ah-wallet small { display: block; color: #64748b; }
.bf-ah-wallet.is-on { border-color: #2f74c0; box-shadow: 0 0 0 3px rgba(47,116,192,.12); }
.bf-ah-wallet.is-low small { color: #b91c1c; }
.bf-ah-pay__row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.bf-ah-pay__row label { flex: 1 1 220px; margin: 0; font-weight: 600; font-size: 13px; }
.bf-ah-pay__row label .input-group { margin-top: 6px; }
@media (max-width: 575.98px) { .bf-ah-wallets { grid-template-columns: 1fr; } .bf-ah-pay__amount { text-align: left; } }
/* Affinity Home: FIS */
.bf-ah-fis__all { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; margin-bottom: 8px; }
.bf-ah-fis__item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: 0 0 8px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; cursor: pointer; font-size: 13px; color: #334155; }
.bf-ah-fis__item input, .bf-ah-fis__all input { margin-top: 3px; accent-color: #16a34a; }
.bf-ah-fis__item.is-on { border-color: #86efac; background: #f0fdf4; }
.bf-ah-otp { letter-spacing: .4em; font-family: Sora, monospace; font-size: 18px; max-width: 200px; }

/* Affinity Home: SCI area */
.bf-ahs { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.bf-ahs__list { padding: 6px; }
.bf-ahs__item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 12px; border-radius: 12px; }
.bf-ahs__item + .bf-ahs__item { border-top: 1px solid #eef2f7; border-radius: 0; }
.bf-ahs__item b { display: block; font-size: 13px; color: #1e293b; }
.bf-ahs__item small { display: block; color: #64748b; margin: 2px 0 6px; }
.bf-ahs__item.is-on { background: #eaf2fb; border-radius: 12px; }
.bf-ahs__parties { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.bf-ahs__parties > div { background: #f6f9fd; border-radius: 12px; padding: 10px 12px; }
.bf-ahs__parties small { display: block; color: #64748b; font-size: 11px; }
.bf-ahs__parties b { display: block; color: #1e293b; }
.bf-ahs__parties span { color: #64748b; font-size: 12px; }
.bf-ahs__contract { border: 1px solid #e2e8f0; border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.bf-ahs__contract-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.bf-ahs__contract-head small { display: block; color: #64748b; }
.bf-ahs__signers { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.bf-ah-contracts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bf-ah-contracts > div { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 12px; }
.bf-ah-contracts b { display: block; font-size: 13px; }
@media (max-width: 991.98px) { .bf-ahs { grid-template-columns: 1fr; } .bf-ahs__parties { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bf-ah-contracts { grid-template-columns: 1fr; } }
/* Affinity Home: corporate lender area */
.bf-ahl__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.bf-ahl__card { border: 1px solid #e2e8f0; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #fff; }
.bf-ahl__card header b { display: block; color: #1e293b; }
.bf-ahl__card header small { color: #64748b; }
.bf-ahl__amount small { display: block; color: #64748b; font-size: 12px; }
.bf-ahl__amount b { font-family: Sora, sans-serif; font-size: 22px; color: #1e4f8a; }
.bf-ahl__card dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin: 0; font-size: 13px; }
.bf-ahl__card dt { font-weight: 500; color: #64748b; }
.bf-ahl__card dd { margin: 0; text-align: right; font-weight: 600; color: #1e293b; }
.bf-ahl__card dd.is-ok { color: #15803d; }
.bf-ahl__checks { display: flex; gap: 8px; }
.bf-ahl__checks span { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: #f1f5f9; color: #94a3b8; }
.bf-ahl__checks span.is-on { background: #dcfce7; color: #15803d; }
.bf-ahl__backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 1040; }
.bf-ahl__dialog { position: fixed; z-index: 1041; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
/* Affinity Home: transfers and dispute */
.bf-ah-transfers > div { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 12px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; margin-bottom: 8px; font-size: 13px; }
.bf-ah-transfers small { display: block; color: #64748b; }
.bf-ah-transfers > div > span:nth-child(2) { font-family: Sora, sans-serif; font-weight: 600; }
.bf-ah-transfers > div.is-done { border-color: #bbf7d0; background: #f0fdf4; }
.bf-ah-transfers > div.is-blocked, .bf-ah-transfers > div.is-failed { border-color: #fecaca; background: #fef2f2; }
.bf-ah-dispute { border: 1px solid #fecaca; background: #fff; border-radius: 12px; padding: 14px; display: grid; gap: 10px; }
.bf-ah-dispute label { font-weight: 600; font-size: 13px; margin: 0; }
.bf-ah-dispute .form-control { margin-top: 6px; }
.bf-ahs__date { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; font-size: 13px; }
.bf-ahs__date .form-control { width: auto; }
/* Affinity Home: back office */
.bf-aha__kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.bf-aha__kpis button { border: 1px solid #e2e8f0; background: #fff; border-radius: 14px; padding: 12px; text-align: left; }
.bf-aha__kpis button b { display: block; font-family: Sora, sans-serif; font-size: 22px; color: #1e293b; }
.bf-aha__kpis button small { color: #64748b; }
.bf-aha__kpis button.is-on { border-color: #2f74c0; box-shadow: 0 0 0 3px rgba(47,116,192,.12); }
.bf-aha__kpis button.is-alert b { color: #dc2626; }
.bf-aha__box { border: 1px solid #e2e8f0; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.bf-aha__box.is-alert { border-color: #fecaca; background: #fef2f2; }
.bf-aha__box summary { cursor: pointer; }
.bf-aha__sched { display: flex; flex-wrap: wrap; gap: 6px; }
.bf-aha__sched span { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #f1f5f9; color: #64748b; font-weight: 600; font-size: 12px; }
.bf-aha__sched span.is-paid { background: #dcfce7; color: #15803d; }
.bf-aha__sched span.is-late { background: #fee2e2; color: #b91c1c; }
.bf-aha__docs { display: flex; flex-wrap: wrap; gap: 12px; }
.bf-aha__history { padding-left: 18px; margin: 0; font-size: 13px; color: #334155; }
.bf-aha__history span { color: #64748b; margin-right: 6px; }
@media (max-width: 991.98px) { .bf-aha__kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* "View the PDF" button (Affinity Home) */
.bf-btn-pdf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; align-self: center; min-height: 36px; padding: 0 16px; border: 1.5px solid #2f74c0; border-radius: 999px; background: #fff; color: #2f74c0; font-weight: 600; font-size: 13px; line-height: 1; text-align: center; white-space: nowrap; text-decoration: none; transition: background .15s, color .15s; }
.bf-btn-pdf i { color: #dc2626; font-size: 15px; }
.bf-btn-pdf:hover { background: #2f74c0; color: #fff; }
.bf-btn-pdf:hover i { color: #fff; }
/* Affinity Home: past dossiers open on click */
.bf-ah-past.is-link { cursor: pointer; transition: background .15s; }
.bf-ah-past.is-link:hover, .bf-ah-past.is-on { background: #f0f6fd; }
.bf-ah-past small { color: #64748b; }

.bf-ah-back { font-weight: 600; padding: 6px 16px; box-shadow: 0 4px 12px rgba(47,116,192,.25); white-space: nowrap; }

/* Header: "Become a lender" button, next to Borrow / Repay */
.bf-header-lender { background: #fff; color: #2f74c0; border: 1.5px solid #2f74c0; white-space: nowrap; }
.bf-header-lender:hover { background: #eaf2fb; color: #1e4f8a; border-color: #1e4f8a; }
.app-header .bf-header-lender { height: 38px !important; border-radius: 999px !important; padding: 0 16px !important; font-size: 13.5px !important; font-weight: 700 !important; display: inline-flex !important; align-items: center; box-shadow: none !important; border: 1.5px solid #2f74c0 !important; }
