/* ===============================
   CREDIT MODAL (Mobile First)
================================ */

.credit-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.credit-modal-overlay.active {
  display: flex;
}

.credit-modal {
  width: 100%;
  max-width: 480px;
  background: var(--panel-bg, #ffffff);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
  animation: slideUp .3s ease;
  overflow: hidden;
}

@keyframes slideUp {
  from { transform: translateY(60px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* HEADER */
.credit-modal-header {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border-light, #eee);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.credit-modal-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.close-credit-modal {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
}

/* BODY */
.credit-modal-body {
  padding: 1rem 1.2rem 1.5rem;
}

/* Sale Summary */
.credit-sale-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 123, 255, 0.06);
  padding: .8rem 1rem;
  border-radius: 14px;
  margin-bottom: 1.2rem;
}

.credit-sale-summary h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
}

.credit-badge {
  background: #ff9800;
  color: white;
  padding: .35rem .7rem;
  border-radius: 30px;
  font-size: .75rem;
  font-weight: 600;
}

/* FORM */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: .85rem;
  margin-bottom: .3rem;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: .75rem .8rem;
  border-radius: 12px;
  border: 1px solid #ddd;
  font-size: .9rem;
  transition: .2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary, #0d6efd);
  box-shadow: 0 0 0 3px rgba(13,110,253,0.1);
}

/* ACTIONS */
.credit-actions {
  display: flex;
  gap: .7rem;
  margin-top: 1rem;
}

.btn-cancel,
.btn-confirm {
  flex: 1;
  padding: .85rem;
  border-radius: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.btn-cancel {
  background: #f1f3f5;
}

.btn-confirm {
  background: #0d3b66;
  color: white;
}

/* DESKTOP */
@media (min-width: 768px) {
  .credit-modal-overlay {
    align-items: center;
  }

  .credit-modal {
    border-radius: 18px;
  }
}
