/* Profile Modal Styles */
.modal {
  --bs-modal-border-radius: 12px;
}

.modal-content {
  border: none;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-bottom: none;
  padding: 1.5rem;
}

.modal-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: white;
}

.modal-title i {
  color: rgba(255, 255, 255, 0.9);
}

.btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.btn-close:hover {
  opacity: 1;
}

.modal-body {
  padding: 2rem;
  background: #fafafa;
}

.modal-footer {
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  padding: 1.25rem 2rem;
}

/* Form Styling */
.form-label {
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.form-control {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  transition: all 0.2s ease-in-out;
  background: white;
}

.form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  outline: none;
}

.form-control::placeholder {
  color: #9ca3af;
  font-size: 0.875rem;
}

/* Select Styling */
select.form-control {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
  appearance: none;
}

/* Textarea Styling */
textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* Required Field Indicator */
.text-danger {
  color: #ef4444 !important;
  font-weight: 600;
}

/* Form Text */
.form-text {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* Button Styling */
.btn {
  font-weight: 500;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  transition: all 0.2s ease-in-out;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #6b7280;
  border: 2px solid #6b7280;
  color: white;
}

.btn-secondary:hover {
  background: #374151;
  border-color: #374151;
  transform: translateY(-1px);
}

.btn-outline-primary {
  border: 2px solid #667eea;
  color: #667eea;
  background: transparent;
}

.btn-outline-primary:hover {
  background: #667eea;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Settings Table Header Enhancement */
.settings-table-header {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 2px solid #e2e8f0;
  border-radius: 12px 12px 0 0;
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settings-table-header i {
  color: #667eea;
  margin-right: 0.75rem;
}

.settings-table-body {
  background: white;
  border: 2px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 1.5rem;
}

/* Personal Info Section Enhancement */
.personal-info-section {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.2s ease-in-out;
}

.personal-info-section:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.personal-info-section .border-bottom {
  border-color: #e2e8f0 !important;
  padding: 1rem 0;
}

.personal-info-section .border-bottom:last-child {
  border-bottom: none !important;
  padding-bottom: 0;
}

/* Badge Enhancement */
.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge.bg-dark {
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%) !important;
}

.badge.bg-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.badge.bg-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

.badge.bg-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: white !important;
}

/* Loading State */
.btn .fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Section Divider */
.modal-body h6 {
  color: #374151;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .modal-dialog {
    margin: 1rem;
  }

  .modal-body {
    padding: 1.5rem;
  }

  .modal-footer {
    padding: 1rem 1.5rem;
    flex-direction: column;
    gap: 0.75rem;
  }

  .modal-footer .btn {
    width: 100%;
  }

  .settings-table-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .personal-info-section .d-flex {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem;
  }

  .personal-info-section .fw-medium {
    min-width: auto !important;
  }
}

/* Focus States for Accessibility */
.form-control:focus,
.btn:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* Custom Input Groups */
.input-group-text {
  background: #f3f4f6;
  border: 2px solid #e5e7eb;
  color: #6b7280;
  font-weight: 500;
}

/* Validation Styles */
.is-invalid {
  border-color: #ef4444 !important;
}

.invalid-feedback {
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 0.25rem;
}

.is-valid {
  border-color: #10b981 !important;
}

.valid-feedback {
  color: #10b981;
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 0.25rem;
}

/* Animation for Modal */
.modal.fade .modal-dialog {
  transform: scale(0.9) translateY(-50px);
  transition: all 0.3s ease-out;
}

.modal.show .modal-dialog {
  transform: scale(1) translateY(0);
}

/* Custom Scrollbar for Modal */
.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
