/* =========================
   GENERAL MODAL
========================= */
#buyModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

#sellModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

#addManualModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  top: 0;
  left: 0;
}

.modal-content {
  position: relative;
  background: #1e293b;
  padding: 24px;
  border-radius: 12px;
  color: #e5e7eb;
  z-index: 1000;
  min-width: 300px;
  text-align: center;
}

.modal-content input {
  width: 80px;
  padding: 4px 6px;
  margin-left: 8px;
}

.modal-buttons {
  margin-top: 16px;
  display: flex;
  justify-content: space-around;
}

.modal-buttons button {
  padding: 6px 12px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-buttons #modalConfirm {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #020617;
}

.modal-buttons #modalCancel {
  background: #ef4444;
  color: #fff;
}

.modal-buttons #addManualConfirm {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #020617;
}

.modal-buttons #addManualCancel {
  background: #ef4444;
  color: #fff;
}
.modal-buttons button:hover {
  transform: translateY(-1px);
}

.modal-buttons button:active {
  transform: scale(0.95);
}

/* Optional: spinner inside modal or table */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #22c55e;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =========================
   MODAL INPUT STYLING
========================= */
.modal-content input {
  width: 100px; /* lebih fleksibel, bisa override inline */
  padding: 8px 12px;
  margin: 8px 0;
  border-radius: 12px;
  border: 2px solid #374151; /* default border */
  background: #111827; /* gelap modern */
  color: #e5e7eb;
  font-size: 14px;
  text-align: center;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

/* Focus state */
.modal-content input:focus {
  border-image: linear-gradient(135deg, #22c55e, #16a34a) 1;
  box-shadow: 0 0 8px rgba(34,197,94,0.6), inset 0 2px 4px rgba(0,0,0,0.3);
  background: #1f2937; /* sedikit lebih terang */
}

/* Placeholder styling */
.modal-content input::placeholder {
  color: #9ca3af;
  font-style: italic;
}

/* Disabled state */
.modal-content input:disabled {
  background: #1e293b;
  color: #64748b;
  cursor: not-allowed;
  border-color: #374151;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}