/**
 * Unified Modal Styles for All Project Modals
 * 
 * This file consolidates all CSS for modal windows across the project:
 * - Login Modal
 * - Logout Modal
 * - Edit Profile Modal
 * 
 * Used for consistent styling and easier maintenance
 */

/* ================================================
   Base Modal Container Styles
   ================================================ */

.modal-content {
  border: none;
  border-radius: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12), 
              0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  background-color: #ffffff;
  transition: all 0.3s ease;
}

.modal-header {
  background: linear-gradient(135deg, #fafaf9 0%, #f5f3ff 100%);
  padding: 1.75rem !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem !important;
}

.modal-title {
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-title svg,
.modal-title i {
  width: 2.75rem;
  height: 2.75rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
  transition: all 0.3s ease;
  font-size: 1.5rem;
}

.modal-title svg:hover,
.modal-title i:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
}

.modal-body {
  padding: 2.25rem 1.75rem !important;
  background-color: #ffffff;
}

.modal-footer {
  background: linear-gradient(180deg, #fafaf9 0%, #f5f3ff 100%);
  padding: 1.25rem 1.75rem !important;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: flex-end;
  border-bottom-left-radius: 1.25rem;
  border-bottom-right-radius: 1.25rem;
}

/* ================================================
   Login Modal Specific Styles
   ================================================ */

.login-modal-content,
.logout-modal-content {
  border: none;
  border-radius: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12), 
              0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  background-color: #ffffff;
}

.login-modal-header,
.logout-modal-header {
  background: linear-gradient(135deg, #fafaf9 0%, #f5f3ff 100%);
  padding: 1.75rem !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logout-modal-header {
  background: linear-gradient(135deg, #fafaf9 0%, #f5f3ff 100%);
}

.login-icon-badge,
.logout-icon-badge {
  width: 2.75rem;
  height: 2.75rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
  transition: all 0.3s ease;
}

.login-icon-badge:hover,
.logout-icon-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
}

.logout-icon-badge {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.logout-icon-badge:hover {
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
}

.login-icon-badge svg,
.logout-icon-badge svg {
  width: 1.5rem;
  height: 1.5rem;
}

.logout-icon-container {
  width: 5.5rem;
  height: 5.5rem;
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

.logout-icon-large-svg {
  color: #dc2626;
}

.login-modal-body,
.logout-modal-body {
  padding: 2.25rem 1.75rem !important;
  background-color: #ffffff;
}

.logout-modal-title {
  color: #1e293b;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.logout-modal-description {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.login-modal-footer,
.logout-modal-footer {
  background: linear-gradient(180deg, #fafaf9 0%, #f5f3ff 100%);
  padding: 1.25rem 1.75rem !important;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.logout-modal-footer {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* ================================================
   Form Controls - Login Form
   ================================================ */

.login-form-group {
  display: flex;
  flex-direction: column;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 0.875rem;
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.2s ease;
  z-index: 2;
}

.login-form-control {
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem 0.75rem 2.75rem !important;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background-color: #f8fafc;
  color: #1e293b;
  font-weight: 500;
}

.login-form-control::placeholder {
  color: #cbd5e1;
  font-weight: 400;
}

.login-form-control:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1 !important;
}

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

.login-form-control:focus ~ .input-icon {
  color: #667eea;
}

/* ================================================
   Form Controls - Edit Profile Modal
   ================================================ */

.form-control-modern.is-invalid ~ .invalid-feedback-modern {
  display: block;
}

/* ================================================
   Form Toggle Switch - Modern Style
   ================================================ */

.form-check-modern {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.form-check-modern:hover {
  border-color: #cbd5e1;
  background: #ffffff;
}

.form-check-modern .form-check-input {
  width: 2.5rem;
  height: 1.5rem;
  margin: 0;
  cursor: pointer;
  border: 2px solid #cbd5e1;
  border-radius: 9999px;
  background: #e2e8f0;
  transition: all 0.3s ease;
  flex-shrink: 0;
  position: relative;
  appearance: none;
  -webkit-appearance: none;
}

.form-check-modern .form-check-input:checked {
  background: #667eea;
  border-color: #667eea;
}

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

.form-check-modern .form-check-input::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0.25rem;
  width: 1rem;
  height: 1rem;
  background: white;
  border-radius: 50%;
  transform: translateY(-50%);
  transition: left 0.3s ease;
}

.form-check-modern .form-check-input:checked::after {
  left: 1.25rem;
}

.form-check-modern label {
  margin: 0;
  cursor: pointer;
  user-select: none;
  flex-grow: 1;
}

.form-check-modern label.form-check-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-check-modern label.form-check-label i {
  color: #667eea;
  font-size: 1rem;
}

.form-check-modern + .form-text-muted {
  margin-top: 0.5rem;
  padding: 0 1rem;
}

/* ================================================
   Form Labels & Typography
   ================================================ */

.form-label {
  color: #1e293b;
  font-size: 0.925rem;
  font-weight: 600;
  margin-bottom: 0.625rem !important;
  letter-spacing: 0.3px;
}

.fw-500 {
  font-weight: 500;
}

.fw-600 {
  font-weight: 600;
}

/* ================================================
   Links
   ================================================ */

.link-forget-password,
.link-signup {
  color: #667eea;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}

.link-forget-password::after,
.link-signup::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #667eea;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.link-forget-password:hover::after,
.link-signup:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.link-forget-password:hover,
.link-signup:hover {
  color: #764ba2;
}

/* ================================================
   Buttons - Unified Styling
   ================================================ */

/* Primary Action Buttons */
.btn-login-submit,
.btn-modern-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  padding: 0.875rem 1.25rem !important;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 48px;
  color: white;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
}

.btn-login-submit::before,
.btn-modern-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-login-submit:hover,
.btn-modern-primary:hover {
  background: linear-gradient(135deg, #5a6fd8, #6a4190);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
  transform: translateY(-2px);
  color: white;
  text-decoration: none;
}

.btn-login-submit:hover::before,
.btn-modern-primary:hover::before {
  left: 100%;
}

.btn-login-submit:active,
.btn-modern-primary:active {
  transform: translateY(0);
}

.btn-login-submit:focus,
.btn-modern-primary:focus {
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2), 0 4px 12px rgba(102, 126, 234, 0.3);
  outline: none;
}

.btn-login-submit:focus-visible,
.btn-modern-primary:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2), 0 4px 12px rgba(102, 126, 234, 0.25);
}

/* Secondary/Cancel Buttons */
.btn-logout-cancel,
.btn-secondary-compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #f1f5f9;
  color: #475569 !important;
  border: none;
  padding: 0.625rem 1.5rem !important;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  min-height: 40px;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.3px;
}

.btn-logout-cancel:hover,
.btn-secondary-compact:hover {
  background-color: #e2e8f0;
  color: #1e293b !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-logout-cancel:focus,
.btn-secondary-compact:focus {
  box-shadow: 0 0 0 3px rgba(226, 232, 240, 0.5);
  outline: none;
}

.btn-logout-cancel:focus-visible,
.btn-secondary-compact:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(226, 232, 240, 0.5);
}

/* Danger/Logout Confirm Button */
.btn-logout-confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white !important;
  border: none;
  padding: 0.625rem 1.5rem !important;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  min-height: 40px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.3px;
}

.btn-logout-confirm:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
  transform: translateY(-2px);
  color: white;
  text-decoration: none;
}

.btn-logout-confirm:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2), 0 4px 12px rgba(239, 68, 68, 0.25);
  outline: none;
}

.btn-logout-confirm:focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2), 0 4px 12px rgba(239, 68, 68, 0.25);
}

/* Close Button */
.btn-close-modal {
  opacity: 0.6;
  transition: all 0.2s ease;
  width: 1.75rem;
  height: 1.75rem;
  background-color: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close-modal::after {
  content: '×';
  font-size: 1.75rem;
  color: #64748b;
  line-height: 1;
}

.btn-close-modal:hover {
  opacity: 1;
  background-color: rgba(226, 232, 240, 0.8);
  border-radius: 0.375rem;
}

.btn-close-modal:focus {
  opacity: 1;
  box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
  outline: none;
}

/* ================================================
   Modal Animations
   ================================================ */

.modal.fade .modal-dialog {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0;
  transform: scale(0.92) translateY(30px);
}

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

/* ================================================
   Utility Classes
   ================================================ */

.flex-grow-1 {
  flex-grow: 1 !important;
}

.gap-2 {
  gap: 0.5rem !important;
}

.text-center {
  text-align: center !important;
}

.text-muted {
  color: #64748b !important;
}

.small {
  font-size: 0.875em;
}

.ms-2 {
  margin-left: 0.5rem !important;
}

/* ================================================
   Dark Mode Support
   ================================================ */

@media (prefers-color-scheme: dark) {
  .modal-content {
    background-color: #1e293b;
    color: #e2e8f0;
  }

  .modal-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-bottom-color: rgba(71, 85, 105, 0.4);
  }

  .modal-body {
    background-color: #1e293b;
  }

  .modal-footer {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    border-top-color: rgba(71, 85, 105, 0.4);
  }

  .login-modal-content,
  .logout-modal-content {
    background-color: #1e293b;
    color: #e2e8f0;
  }

  .login-modal-header,
  .logout-modal-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-bottom-color: rgba(71, 85, 105, 0.4);
  }

  .logout-modal-header {
    background: linear-gradient(135deg, #1f1f1f 0%, #2d1b1b 100%);
  }

  .login-modal-body,
  .logout-modal-body {
    background-color: #1e293b;
  }

  .login-modal-footer,
  .logout-modal-footer {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    border-top-color: rgba(71, 85, 105, 0.4);
  }

  .modal-title,
  .logout-modal-title {
    color: #e2e8f0;
  }

  .logout-modal-description,
  .text-muted {
    color: #94a3b8 !important;
  }

  .login-form-control {
    background-color: #0f172a;
    border-color: #334155 !important;
    color: #e2e8f0;
  }

  .login-form-control::placeholder {
    color: #475569;
  }

  .login-form-control:hover {
    background-color: #1e293b;
    border-color: #475569 !important;
  }

  .login-form-control:focus {
    background-color: #1e293b;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
  }

  .input-icon {
    color: #64748b;
  }

  .login-form-control:focus ~ .input-icon {
    color: #60a5fa;
  }

  .form-control-modern {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0;
  }

  .form-control-modern::placeholder {
    color: #475569;
  }

  .form-control-modern:hover {
    background: #1e293b !important;
    border-color: #475569;
  }

  .form-control-modern:focus {
    background: #1e293b !important;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
  }

  .form-control-modern:disabled,
  .form-control-modern[readonly] {
    background: #334155 !important;
    color: #64748b;
    border-color: #475569;
  }

  .form-label-modern {
    color: #e2e8f0;
  }

  .form-label-modern:hover {
    color: #f1f5f9;
  }

  .form-text-muted {
    color: #64748b;
  }

  .link-forget-password,
  .link-signup {
    color: #60a5fa;
  }

  .link-forget-password::after,
  .link-signup::after {
    background-color: #60a5fa;
  }

  .link-forget-password:hover,
  .link-signup:hover {
    color: #93c5fd;
  }

  .btn-logout-cancel,
  .btn-secondary-compact {
    background-color: #334155;
    color: #e2e8f0 !important;
  }

  .btn-logout-cancel:hover,
  .btn-secondary-compact:hover {
    background-color: #475569;
    color: #f1f5f9 !important;
  }
}

/* ================================================
   Responsive Design
   ================================================ */

@media (max-width: 768px) {
  .modal-dialog {
    margin: 0.5rem !important;
  }

  .modal-header {
    flex-wrap: wrap;
    padding: 1.25rem !important;
  }

  .modal-body {
    padding: 1.5rem 1.25rem !important;
  }

  .modal-footer {
    flex-wrap: wrap;
    padding: 1rem 1.25rem !important;
  }

  .modal-title {
    font-size: 1.1rem;
  }

  .modal-title svg,
  .modal-title i {
    width: 2.25rem;
    height: 2.25rem;
  }

  .login-form-control {
    padding: 0.65rem 0.875rem 0.65rem 2.5rem !important;
    font-size: 0.9rem;
  }

  .form-control-modern {
    padding: 0.65rem 0.875rem !important;
    font-size: 0.9rem;
  }

  .btn-login-submit,
  .btn-modern-primary {
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem;
    min-height: 44px;
  }

  .btn-logout-cancel,
  .btn-logout-confirm,
  .btn-secondary-compact {
    padding: 0.575rem 1.25rem !important;
    font-size: 0.9rem;
    min-height: 36px;
  }

  .logout-modal-footer {
    flex-direction: column;
    gap: 0.75rem;
  }

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

  .logout-modal-footer form {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .modal-header {
    padding: 1rem !important;
  }

  .modal-body {
    padding: 1.25rem 1rem !important;
  }

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

  .modal-title {
    font-size: 1rem;
  }

  .modal-title svg,
  .modal-title i {
    width: 2rem;
    height: 2rem;
  }

  .login-form-control,
  .form-control-modern {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .btn-login-submit,
  .btn-modern-primary,
  .btn-logout-cancel,
  .btn-logout-confirm,
  .btn-secondary-compact {
    width: 100%;
  }

  .logout-modal-title {
    font-size: 1rem;
  }

  .logout-modal-description {
    font-size: 0.9rem;
  }
}

/* ================================================
   PostgreSQL Connector Modal Styles
   ================================================ */

.connector-icon-badge.postgresql-badge {
  width: 2.75rem;
  height: 2.75rem;
  background: linear-gradient(135deg, #336791, #2c5aa0);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(51, 103, 145, 0.25);
  transition: all 0.3s ease;
}

.connector-icon-badge.postgresql-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(51, 103, 145, 0.35);
}

.connector-icon-badge.postgresql-badge svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Toggle Password Button */
.toggle-password {
  border: 1.5px solid #e2e8f0 !important;
  background-color: #f8fafc !important;
  color: #667eea !important;
  padding: 0.75rem 1rem !important;
  border-radius: 0 0.75rem 0.75rem 0 !important;
  transition: all 0.2s ease;
}

.toggle-password:hover {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

.toggle-password:focus {
  box-shadow: none !important;
  outline: none;
}

.input-group .form-control-modern {
  border-radius: 0.75rem 0 0 0.75rem !important;
}

/* Adjust form check styling */
.form-check {
  padding: 0.75rem;
  background-color: #f8fafc;
  border-radius: 0.75rem;
  border: 1.5px solid #e2e8f0;
}

.form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.25rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-check-input:checked {
  background-color: #667eea;
  border-color: #667eea;
}

.form-check-input:hover {
  border-color: #667eea;
}

.form-check-label {
  margin-bottom: 0;
  font-size: 0.95rem;
  color: #374151;
  font-weight: 500;
  cursor: pointer;
}

/* Form Switch (Toggle) Styling */
.form-switch {
  margin: 0;
}

.form-switch .form-check-input {
  width: 2.5rem;
  height: 1.5rem;
  border-radius: 1rem;
  margin-top: 0.125rem;
  background-color: #cbd5e1;
  border-color: #cbd5e1;
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-switch .form-check-input:checked {
  background-color: #667eea;
  border-color: #667eea;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='white'/%3e%3c/svg%3e");
  background-position: left 0.25rem center;
}

.form-switch .form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
  border-color: #667eea;
}

.form-switch .form-check-input:hover {
  border-color: #667eea;
}

/* ================================================
   MongoDB Connector Modal Styles
   ================================================ */

.connector-icon-badge.mongodb-badge {
  width: 2.75rem;
  height: 2.75rem;
  background: linear-gradient(135deg, #13aa52, #0e7a38);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(19, 170, 82, 0.25);
  transition: all 0.3s ease;
}

.connector-icon-badge.mongodb-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(19, 170, 82, 0.35);
}

.connector-icon-badge.mongodb-badge svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* ================================================
   AWS S3 Connector Modal Styles
   ================================================ */

.connector-icon-badge.s3-badge {
  width: 2.75rem;
  height: 2.75rem;
  background: linear-gradient(135deg, #F7A80D, #E09B00);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(247, 168, 13, 0.25);
  transition: all 0.3s ease;
}

.connector-icon-badge.s3-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(247, 168, 13, 0.35);
}

.connector-icon-badge.s3-badge svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* ================================================
   Delete Connector Modal Styles
   ================================================ */

.connector-icon-badge.delete-badge {
  width: 2.75rem;
  height: 2.75rem;
  background: linear-gradient(135deg, #EF4444, #DC2626);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
  transition: all 0.3s ease;
}

.connector-icon-badge.delete-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
}

/* ================================================
   Dataset Columns Modal Styles
   ================================================ */

.connector-icon-badge.dataset-badge {
  width: 2.75rem;
  height: 2.75rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
  transition: all 0.3s ease;
}

.connector-icon-badge.dataset-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
}

/* Alert Wrapper */
.alert-wrapper {
  background: linear-gradient(135deg, #fef2f2, #fff5f5);
  border: 1.5px solid #fca5a5;
  border-radius: 0.75rem;
  padding: 1rem;
}

.alert-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.alert-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #7f1d1d;
  margin: 0;
}

.alert-message {
  font-size: 0.875rem;
  color: #991b1b;
  line-height: 1.5;
}

/* Dataset Info Alert */
.dataset-info-alert {
  background: linear-gradient(135deg, #f5f3ff, #faf5ff);
  border: 1.5px solid #c4b5fd;
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #5b21b6;
}

.dataset-info-alert i {
  font-size: 1.25rem;
  color: #7c3aed;
  flex-shrink: 0;
}

.dataset-info-alert small {
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Dataset Warning Alert */
.dataset-warning-alert {
  background: linear-gradient(135deg, #fef3c7, #fef9e7);
  border: 1.5px solid #fde68a;
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: #92400e;
}

.dataset-warning-alert i {
  font-size: 1.25rem;
  color: #d97706;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.dataset-warning-alert strong {
  font-weight: 600;
  font-size: 0.95rem;
  color: #78350f;
  display: block;
  margin-bottom: 0.25rem;
}

.dataset-warning-alert p {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #92400e;
}

/* Danger Button */
.btn-danger-modern {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  border: none;
  color: white;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 6px rgba(239, 68, 68, 0.25);
}

.btn-danger-modern:hover {
  background: linear-gradient(135deg, #DC2626, #B91C1C);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(239, 68, 68, 0.35);
  color: white;
  text-decoration: none;
}

.btn-danger-modern:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.25);
}

.btn-danger-modern:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* ================================================
   Custom Checkbox for is_public Field
   ================================================ */

.form-check-custom {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.75rem;
  transition: all 0.2s ease;
}

.form-check-custom:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.form-check-custom .form-check-input {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  margin-right: 1rem;
  border: 2px solid #cbd5e1;
  border-radius: 0.4375rem;
  background-color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
}

.form-check-custom .form-check-input:checked {
  background-color: #667eea;
  border-color: #667eea;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
}

.form-check-custom .form-check-input:hover:not(:disabled) {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.form-check-custom .form-check-input:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.form-check-custom .form-check-input:disabled {
  background-color: #f3f4f6;
  border-color: #d1d5db;
  cursor: not-allowed;
}

.form-check-custom .form-check-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0;
  cursor: pointer;
  user-select: none;
  flex: 1;
}

.form-check-custom .check-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.form-check-custom .check-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.4;
}

.form-check-custom .form-check-input:checked ~ .form-check-label .check-text {
  color: #667eea;
  font-weight: 600;
}

/* Dark mode support for custom checkbox */
@media (prefers-color-scheme: dark) {
  .form-check-custom {
    background: #0f172a;
    border-color: #334155;
  }

  .form-check-custom:hover {
    background: #1e293b;
    border-color: #475569;
  }

  .form-check-custom .form-check-input {
    background-color: #1e293b;
    border-color: #475569;
  }

  .form-check-custom .form-check-label .check-text {
    color: #e2e8f0;
  }

  .form-check-custom .form-check-input:hover:not(:disabled) {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
  }

  .form-check-custom .form-check-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
  }

  .form-check-custom .form-check-input:checked ~ .form-check-label .check-text {
    color: #93c5fd;
  }

  .form-check-custom .form-check-input:disabled {
    background-color: #334155;
    border-color: #475569;
  }
}

/* Responsive design for custom checkbox */
@media (max-width: 768px) {
  .form-check-custom {
    padding: 0.875rem;
  }

  .form-check-custom .form-check-input {
    width: 1.375rem;
    height: 1.375rem;
    margin-right: 0.875rem;
  }

  .form-check-custom .check-text {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .form-check-custom {
    padding: 0.75rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .form-check-custom .form-check-input {
    margin-right: 0;
  }

  .form-check-custom .form-check-label {
    width: 100%;
  }

  .form-check-custom .check-text {
    font-size: 0.875rem;
  }
}
