/* ============================================
   MODALES - ESTILOS CORRECTOS
   ============================================ */

/* Z-index para que aparezcan sobre todo */
.modal {
  z-index: 2000 !important;
}

.modal-backdrop {
  z-index: 1999 !important;
}

.modal-content {
  background: #ffffff !important;
  color: #212529 !important;
  border-radius: 12px;
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
  background: var(--gradient-primary);
  color: white !important;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  padding: 1.25rem 1.5rem;
}

.modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.modal-header .btn-close:hover {
  opacity: 1;
}

.modal-title {
  color: white !important;
  font-weight: 600;
}

.modal-body {
  padding: 1.5rem;
  background: #ffffff !important;
  color: #212529 !important;
}

.modal-footer {
  border-top: 1px solid #dee2e6;
  background: #f8f9fa !important;
  border-radius: 0 0 12px 12px;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Estilos de formularios dentro del modal */
.modal-body .form-label {
  color: #495057 !important;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.modal-body .form-control,
.modal-body .form-select {
  background: #ffffff !important;
  color: #212529 !important;
  border: 1px solid #ced4da;
  border-radius: 6px;
  padding: 0.625rem 0.875rem;
}

.modal-body .form-control:focus,
.modal-body .form-select:focus {
  background: #ffffff !important;
  color: #212529 !important;
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 0.2rem rgba(0, 217, 255, 0.25);
}

.modal-body .form-control::placeholder {
  color: #6c757d !important;
  opacity: 0.6;
}

.modal-body textarea.form-control {
  background: #ffffff !important;
  color: #212529 !important;
}

/* Botones en modales */
.modal-footer .btn-primary {
  background: var(--gradient-primary);
  border: none;
  color: white !important;
  font-weight: 500;
  padding: 0.75rem 2rem;
  border-radius: 6px;
  font-size: 1rem;
  min-width: 120px;
  width: auto !important; /* Override global style */
}

.modal-footer .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.modal-footer .btn-secondary {
  background: #6c757d;
  border: none;
  color: white !important;
  padding: 0.75rem 2rem;
  border-radius: 6px;
  font-size: 1rem;
  min-width: 120px;
}

.modal-footer .btn-secondary:hover {
  background: #5a6268;
}

/* Text danger para campos requeridos */
.modal-body .text-danger {
  color: #dc3545 !important;
}
