/* ========== Trang Đơn xin vay ========== */
.page-loan {
  background: linear-gradient(180deg, #93a8c7 0%, #b8c9e0 40%, #c5d4eb 100%);
}

.loan-app {
  min-height: 100vh;
  padding-bottom: 2rem;
}

/* Thanh tiêu đề */
.loan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(30, 58, 95, 0.85);
  backdrop-filter: blur(8px);
}

.loan-back {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
}

.loan-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.loan-header-placeholder {
  width: 40px;
}

/* Khung nội dung chính */
.loan-main {
  position: relative;
  margin: 16px;
  padding: 24px 20px 28px;
  background: rgba(59, 100, 160, 0.45);
  border-radius: 16px;
  overflow: hidden;
}

.loan-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 0%, transparent 45%),
              radial-gradient(circle at 80% 70%, rgba(255,255,255,0.06) 0%, transparent 40%);
  pointer-events: none;
}

/* Hero text */
.loan-hero {
  text-align: center;
  margin-bottom: 24px;
  position: relative;
}

.loan-hero-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px 0;
}

.loan-hero-subtitle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
}

/* Nhập số tiền */
.loan-amount-block {
  margin-bottom: 12px;
  position: relative;
}

.loan-label {
  display: block;
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 6px;
}

.loan-input-wrap {
  display: flex;
  align-items: baseline;
  border-bottom: 2px solid rgba(255, 255, 255, 0.9);
  padding-bottom: 4px;
}

.loan-input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  outline: none;
}

.loan-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.loan-currency {
  font-size: 1.1rem;
  color: #fff;
  margin-left: 4px;
}

/* Slider */
.loan-slider-wrap {
  margin-bottom: 20px;
  position: relative;
  height: 8px;
}

.loan-slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 8px;
  border-radius: 4px;
  background: #22c55e;
  width: 5%;
  pointer-events: none;
  transition: width 0.1s ease;
}

.loan-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.5);
  outline: none;
  position: relative;
  z-index: 1;
}

.loan-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #22c55e;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.loan-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #22c55e;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}


/* Nút chọn kỳ hạn */
.loan-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  position: relative;
}

.loan-term-btn {
  flex: 1;
  min-width: calc(20% - 6px);
  padding: 10px 6px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.loan-term-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.loan-term-btn.active {
  background: #22c55e;
  color: #fff;
}

/* Chi tiết khoản vay */
.loan-details {
  margin-bottom: 24px;
  position: relative;
}

.loan-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  gap: 12px;
}

.loan-detail-row:last-child {
  border-bottom: none;
}

.loan-detail-label {
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
}

.loan-detail-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  text-align: right;
}

/* Nút Đăng ký vay */
.loan-cta {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  background: #22c55e;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.loan-cta:hover {
  background: #16a34a;
}

.loan-cta:active {
  transform: scale(0.98);
}

.loan-pending-msg {
  margin-top: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  text-align: center;
}

.loan-pending-msg p {
  margin: 0 0 16px 0;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.4;
}

.loan-cta--secondary {
  display: inline-block;
  width: auto;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.9);
  color: #1e40af;
  text-decoration: none;
  font-size: 0.95rem;
}

.loan-cta--secondary:hover {
  background: #fff;
}
