/* ============================================================
   Loan Management System — Portal Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --green:        #10b981;
  --green-dark:   #059669;
  --green-light:  #d1fae5;
  --green-glow:   rgba(16,185,129,.12);
  --navy:         #0b1120;
  --navy-2:       #111827;
  --sidebar-w:    230px;
  --header-h:     64px;
  --white:        #ffffff;
  --bg:           #f0f4f8;
  --card:         #ffffff;
  --border:       #e2e8f0;
  --text:         #0f172a;
  --text-2:       #475569;
  --text-3:       #94a3b8;
  --red:          #ef4444;
  --red-light:    #fee2e2;
  --amber:        #f59e0b;
  --amber-light:  #fef3c7;
  --blue:         #3b82f6;
  --blue-light:   #dbeafe;
  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
  --shadow-md:    0 4px 6px rgba(0,0,0,.07), 0 10px 32px rgba(0,0,0,.08);
  --transition:   .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-brand {
  padding: 22px 20px 18px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-brand svg { width: 34px; height: 34px; flex-shrink: 0; }
.sidebar-brand-text { font-size: 13px; font-weight: 700; color: #fff; letter-spacing: .3px; line-height: 1.2; }
.sidebar-brand-text span { display: block; font-size: 10px; font-weight: 400; color: var(--green); letter-spacing: 1.5px; text-transform: uppercase; margin-top: 1px; }

.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }

.nav-label {
  font-size: 10px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: rgba(255,255,255,.25);
  padding: 12px 10px 6px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  color: rgba(255,255,255,.6); font-size: 13.5px; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: background var(--transition), color var(--transition);
  margin-bottom: 2px; position: relative;
}
.nav-item svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.9); }
.nav-item.active { background: var(--green-glow); color: var(--green); }
.nav-item.active svg { stroke: var(--green); }

.nav-badge {
  margin-left: auto;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 99px;
  min-width: 18px; text-align: center;
}

.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
}
.sidebar-user-label { font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,.3); margin-bottom: 6px; }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: #fff; }
.sidebar-user-email { font-size: 11px; color: rgba(255,255,255,.4); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-logout {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; margin: 8px 10px;
  border-radius: 8px; color: rgba(255,255,255,.45);
  font-size: 13px; cursor: pointer; text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.sidebar-logout svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-logout:hover { background: rgba(239,68,68,.12); color: #f87171; }

/* ── Mobile overlay ── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 99;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  /* min-width:0 lets the column shrink to the viewport; without it a wide
     child (e.g. a data table) stretches the whole page past the screen edge */
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top bar ── */
.topbar {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 28px; gap: 16px;
  position: sticky; top: 0; z-index: 50;
}

.topbar-menu {
  display: none; background: none; border: none;
  cursor: pointer; padding: 6px; color: var(--text-2);
}
.topbar-menu svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.topbar-title { font-size: 17px; font-weight: 700; color: var(--text); flex: 1; }
.topbar-sub   { font-size: 12px; color: var(--text-3); margin-top: 1px; }

.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.notif-btn {
  position: relative; background: none; border: none;
  cursor: pointer; padding: 8px; border-radius: 8px;
  color: var(--text-2); transition: background var(--transition);
}
.notif-btn:hover { background: var(--bg); }
.notif-btn svg   { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }
.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--white);
}

/* ── Page content ── */
.page-content { padding: 28px; flex: 1; }

/* ── Hero banner ── */
.hero {
  background: linear-gradient(120deg, var(--navy) 0%, #1a2f4a 100%);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between;
  overflow: hidden; position: relative;
}
.hero::after {
  content: ''; position: absolute; right: -40px; top: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(16,185,129,.08); pointer-events: none;
}
.hero-title { font-size: 22px; font-weight: 700; color: #fff; }
.hero-sub   { font-size: 13px; color: rgba(255,255,255,.55); margin-top: 4px; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--green-glow); border: 1px solid rgba(16,185,129,.25); color: var(--green); font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 99px; margin-top: 10px; }
.hero-badge svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.5; }

/* Reusable dark info/security banner (banking, documents, etc.) */
.secure-banner { background: var(--navy); border-radius: var(--radius); padding: 28px 32px; display: flex; gap: 32px; align-items: center; }
.secure-banner-points { display: flex; flex-direction: column; gap: 10px; min-width: 200px; }

/* ============================================================
   CARDS & STATS
   ============================================================ */
.cards-grid { display: grid; gap: 16px; }
/* Grid/flex children default to min-width:auto and refuse to shrink below their
   content (e.g. a <select> as wide as its longest option), which stretches the
   page on mobile. Allow them to shrink to the available width. */
.cards-grid > * { min-width: 0; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-body { padding: 20px; }
.card-header-bar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title-sm { font-size: 14px; font-weight: 600; color: var(--text); }
.card-footer-bar {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: #fafbfc;
  border-radius: 0 0 var(--radius) var(--radius);
}

.stat-card { padding: 20px; }
.stat-label { font-size: 12px; font-weight: 500; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.stat-label svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stat-value  { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1; }
.stat-value.green { color: var(--green); }
.stat-meta   { font-size: 12px; color: var(--text-3); margin-top: 6px; }

/* ============================================================
   BADGES / STATUS
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px;
}
.badge-green   { background: var(--green-light);  color: #065f46; }
.badge-amber   { background: var(--amber-light);  color: #92400e; }
.badge-red     { background: var(--red-light);    color: #991b1b; }
.badge-blue    { background: var(--blue-light);   color: #1e40af; }
.badge-gray    { background: #f1f5f9; color: #475569; }
.badge-navy    { background: #e0e7ef; color: #1e3a5f; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  cursor: pointer; border: none; text-decoration: none;
  transition: background var(--transition), transform .1s, box-shadow var(--transition);
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.btn:active { transform: scale(.98); }

.btn-primary { background: var(--green); color: #fff; box-shadow: 0 2px 8px rgba(16,185,129,.25); }
.btn-primary:hover { background: var(--green-dark); box-shadow: 0 4px 16px rgba(16,185,129,.35); }

.btn-outline { background: transparent; color: var(--green); border: 1.5px solid var(--green); }
.btn-outline:hover { background: var(--green-glow); }

.btn-ghost { background: transparent; color: var(--text-2); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--bg); border-color: #cbd5e1; }

.btn-danger { background: var(--red-light); color: var(--red); border: none; }
.btn-danger:hover { background: #fecaca; }

.btn-sm { padding: 6px 14px; font-size: 12.5px; }
.btn-lg { padding: 13px 24px; font-size: 15px; }

.btn:disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }

.btn-loading { position: relative; color: transparent !important; }
.btn-loading::after {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.form-label span { color: var(--red); margin-left: 2px; }

.form-control {
  width: 100%; padding: 10px 14px;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 14px; font-family: inherit; outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-glow); }
.form-control::placeholder { color: var(--text-3); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }

.form-hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--red); margin-top: 5px; display: none; }
.form-error.show { display: block; }
.form-control.invalid { border-color: var(--red); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 11px 16px; text-align: left;
  font-size: 11px; font-weight: 600; letter-spacing: .5px;
  text-transform: uppercase; color: var(--text-3);
  background: #f8fafc; border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 14px 16px; font-size: 13.5px; color: var(--text);
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafbfc; }
.td-mono { font-family: 'Courier New', monospace; font-size: 13px; color: var(--green); font-weight: 600; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center; padding: 56px 20px;
  color: var(--text-3);
}
.empty-state svg { width: 52px; height: 52px; stroke: #cbd5e1; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin: 0 auto 16px; display: block; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.empty-state p  { font-size: 13px; color: var(--text-3); max-width: 320px; margin: 0 auto 20px; }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-wrap { background: #e2e8f0; border-radius: 99px; overflow: hidden; height: 8px; }
.progress-bar  { height: 100%; border-radius: 99px; background: var(--green); transition: width .6s ease; }

/* ============================================================
   STEP TRACKER (Disbursement)
   ============================================================ */
.steps { display: flex; align-items: flex-start; justify-content: space-between; position: relative; }
.steps::before {
  content: ''; position: absolute;
  top: 18px; left: calc(50% / 4); right: calc(50% / 4);
  height: 2px; background: var(--border); z-index: 0;
}
.step { flex: 1; text-align: center; position: relative; z-index: 1; }
.step-dot {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--white);
  margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--text-3);
  transition: all .3s;
}
.step.done .step-dot { background: var(--green); border-color: var(--green); color: #fff; }
.step.active .step-dot { border-color: var(--green); color: var(--green); box-shadow: 0 0 0 4px var(--green-glow); }
.step.active .step-dot::after {
  content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--green);
}
.step-label { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; }
.step-sub   { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.step.done .step-label, .step.active .step-label { color: var(--green); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.45); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white); border-radius: 16px;
  width: 100%; max-width: 520px;
  box-shadow: 0 24px 80px rgba(0,0,0,.2);
  animation: modal-in .2s ease;
}
@keyframes modal-in { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header { padding: 22px 24px 0; display: flex; align-items: flex-start; justify-content: space-between; }
.modal-title { font-size: 17px; font-weight: 700; }
.modal-close { background: none; border: none; cursor: pointer; padding: 4px; color: var(--text-3); border-radius: 6px; }
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-close svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.modal-body   { padding: 20px 24px; }
.modal-footer { padding: 0 24px 22px; display: flex; gap: 10px; justify-content: flex-end; }

/* ============================================================
   ALERT / TOAST
   ============================================================ */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 18px;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.alert-success { background: var(--green-light); color: #065f46; }
.alert-error   { background: var(--red-light);   color: #991b1b; }
.alert-info    { background: var(--blue-light);   color: #1e40af; }
.alert-amber   { background: var(--amber-light);  color: #92400e; }

/* Toast */
#toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  background: var(--navy); color: #fff;
  padding: 12px 20px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  transform: translateY(80px); opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
  display: flex; align-items: center; gap: 10px;
  max-width: 340px;
}
#toast.show { transform: translateY(0); opacity: 1; }
#toast.toast-success { border-left: 3px solid var(--green); }
#toast.toast-error   { border-left: 3px solid var(--red); }

/* ============================================================
   CHAT
   ============================================================ */
.chat-messages { height: 380px; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { max-width: 72%; display: flex; flex-direction: column; }
.chat-msg.mine { align-self: flex-end; align-items: flex-end; }
.chat-msg.theirs { align-self: flex-start; }
.chat-bubble {
  padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.5;
}
.chat-msg.mine .chat-bubble   { background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.theirs .chat-bubble { background: #f1f5f9; color: var(--text); border-bottom-left-radius: 4px; }
.chat-time { font-size: 11px; color: var(--text-3); margin-top: 3px; padding: 0 4px; }
.chat-input-bar { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; gap: 10px; }
.chat-input-bar input { flex: 1; }

/* ============================================================
   LOADING SKELETON
   ============================================================ */
.skeleton { background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main { margin-left: 0; }
  .topbar-menu { display: flex; flex: 0 0 auto; }
  /* Let the header grow and wrap instead of clipping its contents */
  .topbar { height: auto; min-height: var(--header-h); padding: 10px 16px; gap: 10px; flex-wrap: wrap; }
  .topbar > div:not(.topbar-actions) { flex: 1 1 auto; min-width: 0; }
  .topbar-title { font-size: 15px; line-height: 1.25; }
  .topbar-sub { font-size: 11px; white-space: normal; }
  .topbar-actions { margin-left: auto; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
  .topbar-actions .form-control { font-size: 12px; padding: 6px 10px; }
  .page-content { padding: 16px; overflow-x: hidden; }
  .cards-3, .cards-2 { grid-template-columns: 1fr; }
  .cards-4 { grid-template-columns: 1fr 1fr; }
  .hero { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px; }
  .hero-title { font-size: 19px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  /* Tighter spacing so content doesn't feel stretched on small screens */
  .card-body { padding: 16px; }
  .card-header-bar { padding: 14px 16px; }
  .stat-card { padding: 16px; }
  .stat-value { font-size: 22px; }
  /* Dark info/security banner: stack instead of overflowing */
  .secure-banner { flex-direction: column; align-items: flex-start; gap: 18px; padding: 20px; }
  .secure-banner-points { min-width: 0; width: 100%; }
  /* Wide tables scroll horizontally instead of crushing into the viewport */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .table-wrap table { min-width: 540px; }

  /* Opt-in: turn a table into stacked cards on mobile (label : value rows) */
  .table-cards, .table-cards table { min-width: 0 !important; overflow: visible; }
  .table-cards table, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards thead { display: none; }
  .table-cards tr {
    border: 1px solid var(--border); border-radius: 10px;
    padding: 10px 14px; margin-bottom: 10px; background: var(--white);
  }
  .table-cards td {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; padding: 7px 0; border: none; text-align: right;
  }
  .table-cards td::before {
    content: attr(data-label);
    font-size: 11px; font-weight: 600; color: var(--text-3);
    text-transform: uppercase; letter-spacing: .4px; text-align: left;
    flex-shrink: 0;
  }
  .table-cards td.td-action { justify-content: center; padding-top: 10px; }
  .table-cards td.td-action::before { display: none; }
  .table-cards td.td-action .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .cards-4 { grid-template-columns: 1fr; }
  /* On the narrowest screens, drop the subtitle and give actions their own row */
  .topbar { padding: 10px 14px; }
  .topbar-sub { display: none; }
  .topbar-actions { width: 100%; margin-left: 0; justify-content: flex-start; }
  .topbar-actions .btn,
  .topbar-actions .form-control { flex: 1 1 auto; justify-content: center; }
}

/* ============================================================
   USER PORTAL APP-STYLE MOBILE BOTTOM NAVIGATION BAR
   ============================================================ */
.portal-mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(11, 17, 32, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 12px 10px;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.35);
}

.portal-mobile-bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
}

.portal-mobile-bottom-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 700;
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 4px 8px;
  border-radius: 8px;
}

.portal-mobile-bottom-item svg {
  width: 20px;
  height: 20px;
  stroke: #94a3b8;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: all 0.2s ease;
}

.portal-mobile-bottom-item.active,
.portal-mobile-bottom-item:hover {
  color: #10b981;
}

.portal-mobile-bottom-item.active svg,
.portal-mobile-bottom-item:hover svg {
  stroke: #10b981;
  transform: translateY(-2px);
}

/* Center CTA item (Apply Loan) highlight button */
.portal-mobile-bottom-item.item-apply {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  border-radius: 12px;
  padding: 6px 14px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}
.portal-mobile-bottom-item.item-apply svg {
  stroke: #ffffff;
}

@media (max-width: 768px) {
  .portal-mobile-bottom-bar { display: block; }
  .page-content { padding-bottom: 84px !important; }
}
