/* ===========================
   Home Loan v1.1.0 — Styling
   =========================== */

/* Base Layout */
.hln-wrap {
  display: flex;
  min-height: 100vh;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: #f5f7fa;
  color: #1f2937;
}

/* Sidebar */
.hln-sidebar {
  width: 240px;
  background: #23502a;
  color: #fff;
  padding: 20px 0;
  flex-shrink: 0;
}
.hln-sidebar-inner ul { list-style: none; margin: 0; padding: 0; }
.hln-sidebar-inner li {
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.2s;
}
.hln-sidebar-inner li:hover,
.hln-sidebar-inner li.active { background: #2f6a36; }

/* Main Area */
.hln-main { flex: 1; padding: 25px; }
.hln-header-section {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 25px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.hln-header-sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hln-header-title { font-size: 18px; font-weight: 600; color: #164a2c; margin: 0; }
.hln-btn.add {
  background: #23502a;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.hln-btn.add:hover { background: #1d4e24; transform: scale(1.05); }

/* Bank Grid */
.hln-bank-title {
  text-align:center;
  font-size:22px;
  font-weight:800;
  color:#164a2c;
  margin:10px 0 20px;
}
.hln-bank-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  gap: 20px;
}
.hln-bank-logo-item {
  background:#fff;
  border:1px solid #e0e0e0;
  border-radius:12px;
  padding:18px;
  text-align:center;
  box-shadow:0 4px 12px rgba(0,0,0,.05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
  cursor:pointer;
}
.hln-bank-logo-item:hover {
  transform: scale(1.03);
  box-shadow:0 6px 18px rgba(0,0,0,.1);
  border-color:#2f6a36;
}
.hln-bank-logo-item img {
  max-width: 120px;
  height: 60px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* ======================
   Popup (4-step form)
   ====================== */
.hln-popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.hln-popup.show { display: flex; }
.hln-popup-content {
  background: #fff;
  border-radius: 12px;
  width: 95%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px 24px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.hln-popup-close {
  position: absolute;
  right: 16px;
  top: 12px;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  color:#374151;
}
.hln-popup-close:hover { color:#111827; }

/* Form */
.hln-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 12px;
}
.hln-field { display:flex; flex-direction:column; gap:6px; }
.hln-field label { font-weight:600; color:#203247; }
.hln-field input, .hln-field textarea, .hln-field select {
  padding:10px;
  border:1px solid #d1d5db;
  border-radius:8px;
  background:#fff;
}
.hln-field textarea { min-height: 70px; }

.hln-step { display:none; }
.hln-step.active { display:block; }

.hln-form-nav {
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:14px;
}
.hln-prev, .hln-next, .hln-submit {
  background:#23502a;
  color:#fff;
  border:none;
  padding:10px 14px;
  border-radius:8px;
  cursor:pointer;
  font-weight:600;
}
.hln-prev[disabled] { opacity:.6; cursor:not-allowed; }

/* Employment radio group */
.hln-employment-group { display:flex; gap:18px; align-items:center; }

/* Documents */
.docs-salaried, .docs-self { display:none; }
.docs-group-title { font-weight:700; color:#164a2c; margin:6px 0 10px; }

/* Small fix for long filenames in file upload fields */
.hln-field input[type="file"] {
  border: 1px dashed #bbb;
  padding: 6px;
  font-size: 13px;
  background: #fafafa;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 900px) {
  .hln-wrap { flex-direction: column; }
  .hln-sidebar {
    position: fixed;
    left: -240px;
    top: 0; bottom: 0;
    transition: left .3s ease;
    z-index: 9999;
  }
  /* .hln-sidebar.open { left: 0; }
  #hln-hamburger {
    display:block;
    position:fixed;
    top:15px;
    left:15px;
    background:#23502a;
    color:#fff;
    border:none;
    border-radius:6px;
    padding:8px 12px;
    z-index:10000;
  } */
  .hln-grid { grid-template-columns: 1fr; }
  .hln-header-sub { flex-direction:column; gap:10px; align-items:center; }
  .hln-main { padding: 15px 15px 80px;  }
}

/* ======================
   New Additions v1.1.0
   ====================== */

/* Better spacing for Uploaded Files list in admin (if shown in iframe/preview) */
.hln-file-list {
  margin-top: 10px;
  list-style: disc;
  margin-left: 20px;
}
.hln-file-list li a {
  color: #23502a;
  text-decoration: none;
  font-weight: 500;
}
.hln-file-list li a:hover {
  text-decoration: underline;
}




/* ===== Mobile Footer & Sidebar ===== */

/* Hide footer on desktop */
@media (min-width: 901px) {
  .cdc-mobile-footer {
    display: none !important;
  }
}

@media (max-width:900px) {
  .cdc-mobile-footer {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0; left: 0; width: 100%;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 8px 0;
    z-index: 2000;
  }
  .cdc-footer-item {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: #444;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
  }
  .cdc-footer-item span { font-size: 11px; }
  .cdc-footer-item.active { color: #23502a; font-weight: 600; }
  .cdc-main { padding-bottom: 70px; }

  /* Sidebar slide-in on mobile */
  #cdc-sidebar {
    position: fixed;
    top: 0; bottom: 0;
    left: -260px;
    width: 240px;
    background: #23502a;
    color: #fff;
    z-index: 3001;
    transition: left .3s ease-in-out;
    box-shadow: 4px 0 16px rgba(0, 0, 0, .25);
  }
  #cdc-sidebar.open { left: 0; }

  /* Overlay fix - only visible while sidebar is open */
  body.sidebar-open::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 3000;
  }
}



.cdc-mobile-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 18px; background: #fff; border-bottom: 1px solid #eee;
  position: sticky; top: 0; z-index: 1000;
}
.cdc-mobile-username { font-weight: 600; font-size: 16px; color: #1a1a1a; cursor: pointer; }
.cdc-mobile-wallet {
  display: flex; align-items: center; gap: 6px;
  background: #e9f8ef; border-radius: 20px;
  padding: 6px 12px; font-weight: 600; color: #155724;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.cdc-mobile-wallet .wallet-icon { font-size: 16px; }
.cdc-mobile-wallet .wallet-balance { font-weight: 700; }


/* ---- Match dashboard behavior: mobile-only header & footer ---- */


@media (max-width: 900px) {
 

  /* Keep room for fixed mobile footer */
  .hln-main { padding: 15px 15px 80px; }  /* top, sides, bottom */
}

/* Optional: if you previously had .hln-main { padding: 70px ... } on mobile,
   that was the 'gap' — the 70px top. The 15px above replaces it. */
