/* Smooth Page Fade Transition */
body {
  
  opacity: 0;
  transition: opacity 0.8s ease;
  padding-bottom: 180px;
}
body.fade-in {
  opacity: 1;
}

/* Layout Fix for Sticky Footer */
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body {
  font-family: 'Segoe UI', sans-serif;
  /* Soft Gradient Background */
  background: linear-gradient(135deg, #e6f7f1 0%, #f3f9ff 100%);
  /* Abstract Pattern Overlay */
  background-image: url("https://www.transparenttextures.com/patterns/cubes.png");
  background-attachment: fixed;
  background-size: cover;
  background-repeat: repeat;
  color: #333;
}



.add-loan-btn {
  margin-top: 10px;
  padding: 10px 16px;
  background: #3498db;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}
.add-loan-btn:hover {
  background: #2980b9;
}
.loan-entry {
  margin-bottom: 15px;
  padding: 15px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fdfbfb, #ebedee);
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}
.loan-entry label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}
.loan-entry input {
  margin-bottom: 10px;
  width: 100%;
  padding: 8px;
}

/* Background */
.background {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: url('https://images.pexels.com/photos/4386370/pexels-photo-4386370.jpeg?auto=compress&cs=tinysrgb&w=1600') no-repeat center center/cover;
  filter: blur(4px) brightness(0.6);
  z-index: -1;
}

/* Form Container */
.apply {
  max-width: 650px;
  margin: 60px auto;
  padding: 40px;
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  background: linear-gradient(135deg, #e0f7fa, #e6f7f1);
  flex: 1;  /* ✅ push footer to bottom if content is less */
}

/* Heading */
.apply h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2.2rem;
  color: #2c3e50;
  background: linear-gradient(90deg, #1abc9c, #2980b9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Progress Bar */
.progressbar {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 30px;
}
.progressbar::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 4px;
  width: 100%;
  background-color: #dcdcdc;
  z-index: -1;
}
.progress-step {
  width: 30px;
  height: 30px;
  background-color: #dcdcdc;
  border-radius: 50%;
}
.progress-step.active {
  background-color: #1abc9c;
  box-shadow: 0 0 10px rgba(26,188,156,0.6);
}
.progress-step::after {
  content: attr(data-title);
  position: absolute;
  top: 40px;
  font-size: 0.8rem;
  color: #444;
}

/* Form Steps */
.form-step {
  display: none;
  animation: slideIn 0.6s ease;
}
.form-step.active {
  display: block;
}

/* Inputs */
.apply input, .apply select {
  padding: 12px;
  border: 1.5px solid #ccc;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 1rem;
  width: 100%;
}
.apply input:focus, .apply select:focus {
  border-color: #1abc9c;
  box-shadow: 0 0 6px rgba(26, 188, 156, 0.4);
  outline: none;
}

/* Buttons */
button, .btn-prev, .btn-next {
  padding: 12px 20px;
  background: linear-gradient(90deg, #1abc9c, #16a085);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}
button:hover, .btn-prev:hover, .btn-next:hover {
  transform: scale(1.05);
  background: linear-gradient(90deg, #16a085, #1abc9c);
}
.btns-group {
  display: flex;
  justify-content: space-between;
}

/* Confirmation Box */
.confirm-box {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Animations */
@keyframes slideIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Submit Button */
.submit-btn {
  padding: 14px 28px;
  background: linear-gradient(90deg, #1abc9c, #16a085);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}
.submit-btn:hover {
  transform: scale(1.05);
  background: linear-gradient(90deg, #16a085, #1abc9c);
}
.submit-btn:active {
  transform: scale(0.97);
}

/* Success Popup */
.popup {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 999;
}
.popup-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  font-size: 1.2rem;
  animation: popIn 0.5s ease;
}
@keyframes popIn {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.remove-loan-btn {
  margin-top: 8px;
  padding: 6px 12px;
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: 0.3s;
}
.remove-loan-btn:hover {
  background: #c0392b;
}

/* Preloader Background */
#preloader {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #2c3e50;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 100000; /* सबके ऊपर */
  color: white;
  font-family: 'Segoe UI', sans-serif;
}

/* Loader Circle */
.loader {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #1abc9c;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Hide after load */
body.loaded #preloader {
  display: none;
}
