/* BallotNexus v6.0.5 - Modern dialog system
   Shared Bootstrap 3 modal + SweetAlert2 convergence layer.
   Presentation/accessibility only: no election, voter, ballot, or permission logic. */

:root {
  --bnx-dialog-backdrop: rgba(15, 23, 42, .56);
  --bnx-dialog-surface: #ffffff;
  --bnx-dialog-surface-soft: #f8fafc;
  --bnx-dialog-border: #dbe4ea;
  --bnx-dialog-border-strong: #cbd5e1;
  --bnx-dialog-ink: #111827;
  --bnx-dialog-copy: #475569;
  --bnx-dialog-muted: #64748b;
  --bnx-dialog-focus: rgba(15, 159, 145, .14);
  --bnx-dialog-shadow: 0 30px 90px rgba(15, 23, 42, .24), 0 8px 24px rgba(15, 23, 42, .08);
  --bnx-dialog-radius: 20px;
  --bnx-dialog-radius-sm: 12px;
}

/* Keep every dialog above the fixed application chrome, but below SweetAlert. */
.modal {
  z-index: 4050 !important;
  padding-right: 0 !important;
}
.modal-backdrop {
  z-index: 4040 !important;
  background: #0f172a !important;
}
.modal-backdrop.in {
  opacity: .56 !important;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
body.modal-open {
  overflow: hidden !important;
}

/* Runtime enhancer adds bnx-modal to legacy and new Bootstrap dialogs. */
.bnx-modal .modal-dialog {
  width: min(640px, calc(100% - 32px)) !important;
  max-width: 640px;
  margin: clamp(28px, 7vh, 72px) auto !important;
}
.bnx-modal .modal-dialog.modal-sm {
  width: min(440px, calc(100% - 32px)) !important;
  max-width: 440px;
}
.bnx-modal .modal-dialog.modal-lg {
  width: min(900px, calc(100% - 32px)) !important;
  max-width: 900px;
}
.bnx-modal .modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 72px);
  max-height: calc(100dvh - 72px);
  overflow: hidden !important;
  color: var(--bnx-dialog-ink) !important;
  background: var(--bnx-dialog-surface) !important;
  border: 1px solid var(--bnx-dialog-border) !important;
  border-radius: var(--bnx-dialog-radius) !important;
  box-shadow: var(--bnx-dialog-shadow) !important;
}
.bnx-modal .modal-content::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  height: 3px;
  background: linear-gradient(90deg, #0f9f91, #14b8a6 60%, #a3e635);
  pointer-events: none;
}
.bnx-modal.bnx-modal--danger .modal-content::before {
  background: #b42318;
}
.bnx-modal.bnx-modal--warning .modal-content::before {
  background: #b7791f;
}
.bnx-modal.bnx-modal--success .modal-content::before {
  background: #15803d;
}

.bnx-modal .modal-header {
  position: relative;
  flex: 0 0 auto;
  min-height: 72px;
  padding: 23px 68px 17px 24px !important;
  color: var(--bnx-dialog-ink) !important;
  background: var(--bnx-dialog-surface) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--bnx-dialog-border) !important;
}
.bnx-modal .modal-header .bnx-modal-kicker {
  display: block;
  margin: 0 0 5px;
  color: #0f9f91 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 1.2;
  letter-spacing: .105em !important;
  text-transform: uppercase;
}
.bnx-modal.bnx-modal--danger .modal-header .bnx-modal-kicker { color: #b42318 !important; }
.bnx-modal.bnx-modal--warning .modal-header .bnx-modal-kicker { color: #a16207 !important; }
.bnx-modal .modal-title {
  margin: 0 !important;
  color: var(--bnx-dialog-ink) !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  letter-spacing: -.02em !important;
}
.bnx-modal .modal-title b,
.bnx-modal .modal-title strong {
  font-weight: inherit !important;
}
.bnx-modal .bnx-modal-subtitle {
  max-width: 560px;
  margin: 6px 0 0 !important;
  color: var(--bnx-dialog-muted) !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
}

.bnx-modal .modal-header .close,
.bnx-modal .bnx-modal-close {
  position: absolute !important;
  top: 18px !important;
  right: 20px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  float: none !important;
  width: 38px;
  height: 38px;
  margin: 0 !important;
  padding: 0 !important;
  color: #475569 !important;
  background: #f8fafc !important;
  border: 1px solid var(--bnx-dialog-border) !important;
  border-radius: 11px !important;
  opacity: 1 !important;
  text-shadow: none !important;
  line-height: 1 !important;
  font-size: 14px !important;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.bnx-modal .modal-header .close:hover,
.bnx-modal .modal-header .close:focus,
.bnx-modal .bnx-modal-close:hover,
.bnx-modal .bnx-modal-close:focus {
  color: #111827 !important;
  background: #eef2f7 !important;
  border-color: #cbd5e1 !important;
  outline: 0 !important;
  box-shadow: 0 0 0 3px var(--bnx-dialog-focus) !important;
}

.bnx-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 21px 24px 22px !important;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--bnx-dialog-copy) !important;
  background: var(--bnx-dialog-surface) !important;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.bnx-modal .modal-body::-webkit-scrollbar { width: 9px; }
.bnx-modal .modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}
.bnx-modal .modal-body > :first-child { margin-top: 0; }
.bnx-modal .modal-body > :last-child { margin-bottom: 0; }
.bnx-modal .modal-body p {
  color: var(--bnx-dialog-copy);
  line-height: 1.65;
}
.bnx-modal .modal-body .text-muted,
.bnx-modal .modal-body .help-block {
  color: var(--bnx-dialog-muted) !important;
}
.bnx-modal .modal-body code {
  color: #0f766e;
  background: #ecfdf5;
  border: 1px solid #d1fae5;
  border-radius: 6px;
  padding: 2px 5px;
}
.bnx-modal .modal-body pre {
  max-height: 42vh;
  overflow: auto;
  padding: 14px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid var(--bnx-dialog-border);
  border-radius: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.bnx-modal .modal-footer {
  flex: 0 0 auto;
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
  min-height: 68px;
  margin: 0 !important;
  padding: 14px 24px 18px !important;
  text-align: right;
  background: var(--bnx-dialog-surface-soft) !important;
  border: 0 !important;
  border-top: 1px solid var(--bnx-dialog-border) !important;
}
.bnx-modal .modal-footer::before,
.bnx-modal .modal-footer::after { display: none !important; }
.bnx-modal .modal-footer .pull-left {
  float: none !important;
  margin-right: auto !important;
}
.bnx-modal .modal-footer .btn + .btn { margin-left: 0 !important; }
.bnx-modal .modal-footer .btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px !important;
  padding: 8px 14px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}
.bnx-modal .modal-footer .btn-default,
.bnx-modal .modal-footer .btn-secondary,
.bnx-modal .modal-footer .btn.btn-flat:not(.btn-primary):not(.btn-success):not(.btn-info):not(.btn-warning):not(.btn-danger) {
  color: #334155 !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
}
.bnx-modal .modal-footer .btn-default:hover,
.bnx-modal .modal-footer .btn-secondary:hover {
  color: #111827 !important;
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
}
/* Reassert semantic buttons after legacy .btn-flat rules. */
.bnx-modal .btn.btn-primary {
  color: #fff !important;
  background: #0f9f91 !important;
  border-color: #0f9f91 !important;
}
.bnx-modal .btn.btn-primary:hover,
.bnx-modal .btn.btn-primary:focus {
  background: #0b8076 !important;
  border-color: #0b8076 !important;
}
.bnx-modal .btn.btn-success {
  color: #fff !important;
  background: #15803d !important;
  border-color: #15803d !important;
}
.bnx-modal .btn.btn-info {
  color: #fff !important;
  background: #0369a1 !important;
  border-color: #0369a1 !important;
}
.bnx-modal .btn.btn-warning {
  color: #fff !important;
  background: #a16207 !important;
  border-color: #a16207 !important;
}
.bnx-modal .btn.btn-danger {
  color: #fff !important;
  background: #b42318 !important;
  border-color: #b42318 !important;
}
.bnx-modal .btn.btn-danger:hover,
.bnx-modal .btn.btn-danger:focus {
  background: #912018 !important;
  border-color: #912018 !important;
}

/* Form convergence inside legacy and new modal bodies. */
.bnx-modal .form-group,
.bnx-modal .bnx-form-field { margin-bottom: 15px !important; }
.bnx-modal label,
.bnx-modal .control-label {
  color: #334155 !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  line-height: 1.4 !important;
}
.bnx-modal .form-control,
.bnx-modal select.form-control,
.bnx-modal textarea.form-control {
  min-height: 42px !important;
  color: #111827 !important;
  background: #fff !important;
  border: 1px solid var(--bnx-dialog-border-strong) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.bnx-modal textarea.form-control {
  min-height: 104px !important;
  resize: vertical;
}
.bnx-modal .form-control:focus,
.bnx-modal select.form-control:focus,
.bnx-modal textarea.form-control:focus {
  border-color: #0f9f91 !important;
  box-shadow: 0 0 0 3px var(--bnx-dialog-focus) !important;
  outline: 0 !important;
}
.bnx-modal .form-control[readonly],
.bnx-modal .form-control[disabled] {
  color: #64748b !important;
  background: #f8fafc !important;
}
.bnx-modal input[type="file"] {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  color: #475569;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
}
.bnx-modal input[type="file"]:focus {
  border-color: #0f9f91;
  outline: 0;
  box-shadow: 0 0 0 3px var(--bnx-dialog-focus);
}
.bnx-modal .input-group-addon,
.bnx-modal .input-group-btn .btn {
  border-color: var(--bnx-dialog-border-strong) !important;
}
.bnx-modal .input-group-addon {
  color: #475569 !important;
  background: #f8fafc !important;
}
.bnx-modal .checkbox label,
.bnx-modal .radio label,
.bnx-modal .bnx-check-field label {
  font-weight: 700 !important;
}
.bnx-modal .help-block {
  margin: 5px 0 0 !important;
  font-size: 10.5px !important;
  line-height: 1.5 !important;
}
.bnx-modal .alert,
.bnx-modal .callout,
.bnx-modal .bnx-inline-notice,
.bnx-modal .bnx-modal-boundary {
  border-radius: 12px !important;
  box-shadow: none !important;
}
.bnx-modal .alert {
  padding: 12px 14px !important;
  font-size: 11.5px !important;
  line-height: 1.55 !important;
}
.bnx-modal .text-center > h2,
.bnx-modal .text-center > .bold {
  margin: 7px 0 0;
  color: #111827 !important;
  font-size: 20px !important;
  line-height: 1.3;
  font-weight: 800 !important;
  letter-spacing: -.015em;
}
.bnx-modal .text-center > p:first-child {
  margin-bottom: 5px;
  color: #64748b !important;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.bnx-modal img.img-responsive,
.bnx-modal .candidate-photo,
.bnx-modal .profile-user-img {
  border-radius: 12px !important;
}

/* Bootstrap helpers that otherwise render behind modal layers. */
.datepicker.dropdown-menu,
.daterangepicker,
.bootstrap-timepicker-widget.dropdown-menu,
.select2-container--open,
.ui-datepicker,
.tooltip,
.popover {
  z-index: 4300 !important;
}

/* Motion: subtle and fast, never bouncy. */
.bnx-modal.fade .modal-dialog {
  opacity: 0;
  transform: translate3d(0, 12px, 0) scale(.985) !important;
  transition: transform .18s ease, opacity .18s ease !important;
}
.bnx-modal.fade.in .modal-dialog {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1) !important;
}

/* SweetAlert2 - same visual language as Bootstrap dialogs. */
.swal2-container {
  z-index: 5200 !important;
  padding: 18px !important;
}
.swal2-container.swal2-backdrop-show,
.swal2-container.swal2-noanimation {
  background: var(--bnx-dialog-backdrop) !important;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.swal2-container.swal2-toast-shown,
body.swal2-toast-shown .swal2-container {
  background: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.swal2-popup.bnx-swal,
.swal2-modern-popup.bnx-swal,
.swal2-popup.swal2-modern-popup {
  width: min(470px, calc(100vw - 32px)) !important;
  padding: 26px 26px 24px !important;
  color: var(--bnx-dialog-ink) !important;
  background: var(--bnx-dialog-surface) !important;
  border: 1px solid var(--bnx-dialog-border) !important;
  border-radius: var(--bnx-dialog-radius) !important;
  box-shadow: var(--bnx-dialog-shadow) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.swal2-popup.bnx-swal::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: #0f9f91;
  border-radius: var(--bnx-dialog-radius) var(--bnx-dialog-radius) 0 0;
}
.swal2-popup.bnx-swal--danger::before { background: #b42318; }
.swal2-popup.bnx-swal--warning::before { background: #a16207; }
.swal2-popup.bnx-swal--success::before { background: #15803d; }
.swal2-popup.bnx-swal--info::before { background: #0369a1; }
.swal2-popup.bnx-swal .swal2-icon {
  width: 52px !important;
  height: 52px !important;
  margin: 3px auto 14px !important;
  border-width: 3px !important;
  font-size: 13px !important;
}
.swal2-popup.bnx-swal .swal2-title,
.swal2-modern-title {
  padding: 0 !important;
  margin: 0 0 8px !important;
  color: var(--bnx-dialog-ink) !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  letter-spacing: -.02em !important;
}
.swal2-popup.bnx-swal .swal2-html-container,
.swal2-popup.bnx-swal .swal2-html-container p,
.swal2-modern-text {
  margin: 0 !important;
  color: var(--bnx-dialog-copy) !important;
  font-size: 12.5px !important;
  line-height: 1.65 !important;
}
.swal2-popup.bnx-swal .swal2-html-container strong { color: #111827 !important; }
.swal2-popup.bnx-swal .swal2-actions {
  width: 100%;
  margin: 20px 0 0 !important;
  gap: 9px !important;
}
.swal2-popup.bnx-swal .swal2-actions .btn,
.swal2-modern-btn,
.bnx-swal__button {
  min-width: 110px;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 8px 14px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}
.swal2-popup.bnx-swal .swal2-confirm.btn-primary {
  color: #fff !important;
  background: #0f9f91 !important;
  border-color: #0f9f91 !important;
}
.swal2-popup.bnx-swal .swal2-confirm.btn-success {
  color: #fff !important;
  background: #15803d !important;
  border-color: #15803d !important;
}
.swal2-popup.bnx-swal .swal2-confirm.btn-warning {
  color: #fff !important;
  background: #a16207 !important;
  border-color: #a16207 !important;
}
.swal2-popup.bnx-swal .swal2-confirm.btn-danger {
  color: #fff !important;
  background: #b42318 !important;
  border-color: #b42318 !important;
}
.swal2-popup.bnx-swal .swal2-cancel,
.swal2-popup.bnx-swal .swal2-deny {
  color: #334155 !important;
  background: #fff !important;
  border: 1px solid #cbd5e1 !important;
}
.swal2-popup.bnx-swal .swal2-close {
  top: 14px !important;
  right: 14px !important;
  width: 36px !important;
  height: 36px !important;
  color: #64748b !important;
  background: #f8fafc !important;
  border: 1px solid var(--bnx-dialog-border) !important;
  border-radius: 10px !important;
  font-size: 23px !important;
  line-height: 1 !important;
}
.swal2-popup.bnx-swal .swal2-input,
.swal2-popup.bnx-swal .swal2-textarea,
.swal2-popup.bnx-swal .swal2-select {
  width: 100% !important;
  margin: 16px 0 0 !important;
  color: #111827 !important;
  background: #fff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  font-size: 13px !important;
}
.swal2-popup.bnx-swal .swal2-input:focus,
.swal2-popup.bnx-swal .swal2-textarea:focus,
.swal2-popup.bnx-swal .swal2-select:focus {
  border-color: #0f9f91 !important;
  box-shadow: 0 0 0 3px var(--bnx-dialog-focus) !important;
}
.swal2-popup.bnx-swal .swal2-validation-message {
  margin: 12px 0 0 !important;
  color: #991b1b !important;
  background: #fff1f2 !important;
  border: 1px solid #fecdd3 !important;
  border-radius: 10px !important;
  font-size: 11px !important;
}
.swal2-popup.bnx-swal .swal2-loader {
  border-color: #0f9f91 transparent #0f9f91 transparent !important;
}

/* Toasts stay compact, below the fixed shell header, and never read like a modal. */
.swal2-container.swal2-modern-toast-container {
  padding: calc(var(--bnx-shell-header, 64px) + 12px) 16px 16px !important;
  pointer-events: none;
}
.swal2-container.swal2-modern-toast-container .swal2-popup { pointer-events: auto; }
.swal2-popup.bnx-swal.bnx-swal--toast,
.swal2-popup.swal2-modern-toast {
  width: min(340px, calc(100vw - 24px)) !important;
  min-width: 0 !important;
  min-height: 60px !important;
  padding: 10px 12px !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .14) !important;
}
.swal2-popup.bnx-swal.bnx-swal--toast::before {
  inset: 0 auto 0 0;
  width: 3px;
  height: 100%;
  border-radius: 14px 0 0 14px;
}
.swal2-popup.bnx-swal.bnx-swal--toast .swal2-icon,
.swal2-popup.swal2-modern-toast .swal2-icon {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  margin: 0 10px 0 0 !important;
  border-width: 2px !important;
  font-size: 8px !important;
}
.swal2-popup.bnx-swal.bnx-swal--toast .swal2-title,
.swal2-popup.swal2-modern-toast .swal2-title {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 13px !important;
  line-height: 1.3 !important;
  text-align: left !important;
}
.swal2-popup.bnx-swal.bnx-swal--toast .swal2-html-container,
.swal2-popup.swal2-modern-toast .swal2-html-container {
  margin: 2px 0 0 !important;
  padding: 0 !important;
  font-size: 11.5px !important;
  line-height: 1.42 !important;
  text-align: left !important;
}
.swal2-popup.bnx-swal.bnx-swal--toast .swal2-timer-progress-bar,
.swal2-popup.swal2-modern-toast .swal2-timer-progress-bar {
  height: 2px !important;
  background: #0f9f91 !important;
}
.swal2-popup.bnx-swal.bnx-swal--toast.bnx-swal--success .swal2-timer-progress-bar { background: #16a34a !important; }
.swal2-popup.bnx-swal.bnx-swal--toast.bnx-swal--danger .swal2-timer-progress-bar { background: #dc2626 !important; }
.swal2-popup.bnx-swal.bnx-swal--toast.bnx-swal--warning .swal2-timer-progress-bar { background: #d97706 !important; }
.swal2-popup.bnx-swal.bnx-swal--toast.bnx-swal--info .swal2-timer-progress-bar { background: #2563eb !important; }

/* Dark mode keeps dialogs legible without introducing a separate visual language. */
html.dark-mode .bnx-modal .modal-content,
html.dark-mode .bnx-modal .modal-header,
html.dark-mode .bnx-modal .modal-body,
body.dark-mode .bnx-modal .modal-content,
body.dark-mode .bnx-modal .modal-header,
body.dark-mode .bnx-modal .modal-body,
html.dark-mode .swal2-popup.bnx-swal,
body.dark-mode .swal2-popup.bnx-swal {
  color: #f8fafc !important;
  background: #111827 !important;
  border-color: #2b3648 !important;
}
html.dark-mode .bnx-modal .modal-header,
body.dark-mode .bnx-modal .modal-header { border-bottom-color: #2b3648 !important; }
html.dark-mode .bnx-modal .modal-footer,
body.dark-mode .bnx-modal .modal-footer {
  background: #0f172a !important;
  border-top-color: #2b3648 !important;
}
html.dark-mode .bnx-modal .modal-title,
html.dark-mode .bnx-modal .modal-body .text-center > h2,
html.dark-mode .swal2-popup.bnx-swal .swal2-title,
html.dark-mode .swal2-popup.bnx-swal .swal2-html-container strong,
body.dark-mode .bnx-modal .modal-title,
body.dark-mode .bnx-modal .modal-body .text-center > h2,
body.dark-mode .swal2-popup.bnx-swal .swal2-title,
body.dark-mode .swal2-popup.bnx-swal .swal2-html-container strong { color: #f8fafc !important; }
html.dark-mode .bnx-modal .modal-body,
html.dark-mode .bnx-modal .modal-body p,
html.dark-mode .bnx-modal .bnx-modal-subtitle,
html.dark-mode .swal2-popup.bnx-swal .swal2-html-container,
body.dark-mode .bnx-modal .modal-body,
body.dark-mode .bnx-modal .modal-body p,
body.dark-mode .bnx-modal .bnx-modal-subtitle,
body.dark-mode .swal2-popup.bnx-swal .swal2-html-container { color: #cbd5e1 !important; }
html.dark-mode .bnx-modal label,
html.dark-mode .bnx-modal .control-label,
body.dark-mode .bnx-modal label,
body.dark-mode .bnx-modal .control-label { color: #dbe4ee !important; }
html.dark-mode .bnx-modal .form-control,
html.dark-mode .bnx-modal input[type="file"],
html.dark-mode .swal2-popup.bnx-swal .swal2-input,
html.dark-mode .swal2-popup.bnx-swal .swal2-textarea,
html.dark-mode .swal2-popup.bnx-swal .swal2-select,
body.dark-mode .bnx-modal .form-control,
body.dark-mode .bnx-modal input[type="file"],
body.dark-mode .swal2-popup.bnx-swal .swal2-input,
body.dark-mode .swal2-popup.bnx-swal .swal2-textarea,
body.dark-mode .swal2-popup.bnx-swal .swal2-select {
  color: #f8fafc !important;
  background: #182235 !important;
  border-color: #3b475a !important;
}
html.dark-mode .bnx-modal .modal-header .close,
html.dark-mode .swal2-popup.bnx-swal .swal2-close,
body.dark-mode .bnx-modal .modal-header .close,
body.dark-mode .swal2-popup.bnx-swal .swal2-close {
  color: #cbd5e1 !important;
  background: #182235 !important;
  border-color: #3b475a !important;
}
html.dark-mode .bnx-modal .modal-footer .btn-default,
html.dark-mode .bnx-modal .modal-footer .btn-secondary,
html.dark-mode .swal2-popup.bnx-swal .swal2-cancel,
body.dark-mode .bnx-modal .modal-footer .btn-default,
body.dark-mode .bnx-modal .modal-footer .btn-secondary,
body.dark-mode .swal2-popup.bnx-swal .swal2-cancel {
  color: #e2e8f0 !important;
  background: #182235 !important;
  border-color: #3b475a !important;
}
html.dark-mode .bnx-modal .modal-body code,
body.dark-mode .bnx-modal .modal-body code {
  color: #99f6e4;
  background: rgba(15, 159, 145, .12);
  border-color: rgba(45, 212, 191, .18);
}

/* Mobile: edge-efficient, touch-friendly, and scroll-safe. */
@media (max-width: 767px) {
  .swal2-container.swal2-modern-toast-container {
    padding: calc(var(--bnx-shell-header, 60px) + 8px) 10px 10px !important;
  }
  .swal2-popup.bnx-swal.bnx-swal--toast,
  .swal2-popup.swal2-modern-toast {
    width: min(100%, 340px) !important;
  }
  .modal { padding: 0 !important; }
  .bnx-modal .modal-dialog,
  .bnx-modal .modal-dialog.modal-sm,
  .bnx-modal .modal-dialog.modal-lg {
    width: auto !important;
    max-width: none !important;
    margin: 10px !important;
  }
  .bnx-modal .modal-content {
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 18px !important;
  }
  .bnx-modal .modal-header {
    min-height: 64px;
    padding: 19px 58px 15px 18px !important;
  }
  .bnx-modal .modal-header .close,
  .bnx-modal .bnx-modal-close {
    top: 14px !important;
    right: 14px !important;
    width: 36px;
    height: 36px;
  }
  .bnx-modal .modal-title { font-size: 18px !important; }
  .bnx-modal .bnx-modal-subtitle { font-size: 11.5px !important; }
  .bnx-modal .modal-body { padding: 17px 18px 18px !important; }
  .bnx-modal .modal-footer {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 0;
    padding: 12px 18px 16px !important;
  }
  .bnx-modal .modal-footer .btn,
  .bnx-modal .modal-footer .pull-left {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
  }
  .bnx-modal .form-horizontal .control-label {
    padding-top: 0 !important;
    margin-bottom: 6px !important;
    text-align: left !important;
  }
  .swal2-container { padding: 12px !important; }
  .swal2-popup.bnx-swal,
  .swal2-modern-popup.bnx-swal,
  .swal2-popup.swal2-modern-popup {
    width: min(100%, 470px) !important;
    padding: 22px 18px 20px !important;
    border-radius: 18px !important;
  }
  .swal2-popup.bnx-swal .swal2-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 8px !important;
  }
  .swal2-popup.bnx-swal .swal2-actions .btn {
    width: 100% !important;
  }
  .swal2-popup.bnx-swal.bnx-swal--toast,
  .swal2-popup.swal2-modern-toast {
    width: calc(100vw - 24px) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bnx-modal.fade .modal-dialog,
  .bnx-modal .modal-header .close,
  .bnx-modal .form-control,
  .swal2-show,
  .swal2-hide {
    transition: none !important;
    animation: none !important;
  }
}
html.bnx-motion-reduced .bnx-modal.fade .modal-dialog,
html.bnx-motion-reduced .bnx-modal .modal-header .close {
  transition: none !important;
}

/* v6.0.7 compact feedback visual convergence.
   SweetAlert2's animated success ring is designed for its default 5em icon and distorted when compressed.
   Toasts now use first-party fixed SVG glyphs in a calm semantic tile instead. */
.swal2-popup.swal2-modern-toast,
.swal2-popup.bnx-swal.bnx-swal--toast {
  width: min(324px, calc(100vw - 20px)) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 9px 11px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-left: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .12) !important;
}
.swal2-popup.bnx-swal.bnx-swal--toast::before {
  display: none !important;
}
.swal2-popup.swal2-modern-toast .swal2-icon,
.swal2-popup.bnx-swal.bnx-swal--toast .swal2-icon {
  display: grid !important;
  place-items: center !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  margin: 0 9px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 9px !important;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .05) !important;
  font-size: 0 !important;
  line-height: 0 !important;
  animation: none !important;
  transform: none !important;
}
.swal2-popup.swal2-modern-toast .swal2-icon.swal2-success,
.swal2-popup.bnx-swal.bnx-swal--toast .swal2-icon.swal2-success {
  color: #15803d !important;
  background: #ecfdf3 !important;
}
.swal2-popup.swal2-modern-toast .swal2-icon.swal2-error,
.swal2-popup.bnx-swal.bnx-swal--toast .swal2-icon.swal2-error {
  color: #b42318 !important;
  background: #fff1f2 !important;
}
.swal2-popup.swal2-modern-toast .swal2-icon.swal2-warning,
.swal2-popup.bnx-swal.bnx-swal--toast .swal2-icon.swal2-warning {
  color: #a16207 !important;
  background: #fffbeb !important;
}
.swal2-popup.swal2-modern-toast .swal2-icon.swal2-info,
.swal2-popup.bnx-swal.bnx-swal--toast .swal2-icon.swal2-info {
  color: #1d4ed8 !important;
  background: #eff6ff !important;
}
.swal2-popup.swal2-modern-toast .swal2-icon .swal2-icon-content,
.swal2-popup.bnx-swal.bnx-swal--toast .swal2-icon .swal2-icon-content {
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  height: 100% !important;
  font-size: 0 !important;
  line-height: 0 !important;
}
.swal2-popup.swal2-modern-toast .bnx-toast-glyph,
.swal2-popup.bnx-swal.bnx-swal--toast .bnx-toast-glyph {
  width: 17px !important;
  height: 17px !important;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.swal2-popup.swal2-modern-toast .swal2-success-ring,
.swal2-popup.swal2-modern-toast .swal2-success-fix,
.swal2-popup.swal2-modern-toast [class^="swal2-success-line"],
.swal2-popup.swal2-modern-toast .swal2-x-mark,
.swal2-popup.bnx-swal.bnx-swal--toast .swal2-success-ring,
.swal2-popup.bnx-swal.bnx-swal--toast .swal2-success-fix,
.swal2-popup.bnx-swal.bnx-swal--toast [class^="swal2-success-line"],
.swal2-popup.bnx-swal.bnx-swal--toast .swal2-x-mark {
  display: none !important;
  animation: none !important;
}
.swal2-popup.swal2-modern-toast .swal2-title,
.swal2-popup.swal2-modern-toast .swal2-modern-toast-title,
.swal2-popup.bnx-swal.bnx-swal--toast .swal2-title {
  margin: 0 !important;
  padding: 0 !important;
  color: #0f172a !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  line-height: 1.28 !important;
  letter-spacing: -.01em !important;
}
.swal2-popup.swal2-modern-toast .swal2-html-container,
.swal2-popup.swal2-modern-toast .swal2-modern-toast-content,
.swal2-popup.bnx-swal.bnx-swal--toast .swal2-html-container {
  margin: 2px 0 0 !important;
  padding: 0 !important;
  color: #526079 !important;
  font-size: 11.75px !important;
  line-height: 1.38 !important;
}
.swal2-popup.swal2-modern-toast .swal2-timer-progress-bar,
.swal2-popup.bnx-swal.bnx-swal--toast .swal2-timer-progress-bar {
  display: none !important;
}
html.dark-mode .swal2-popup.swal2-modern-toast,
body.dark-mode .swal2-popup.swal2-modern-toast,
html.dark-mode .swal2-popup.bnx-swal.bnx-swal--toast,
body.dark-mode .swal2-popup.bnx-swal.bnx-swal--toast {
  background: #111827 !important;
  border-color: #293548 !important;
  border-left-color: #293548 !important;
  box-shadow: 0 12px 30px rgba(2, 6, 23, .36) !important;
}
html.dark-mode .swal2-popup.swal2-modern-toast .swal2-title,
body.dark-mode .swal2-popup.swal2-modern-toast .swal2-title,
html.dark-mode .swal2-popup.bnx-swal.bnx-swal--toast .swal2-title,
body.dark-mode .swal2-popup.bnx-swal.bnx-swal--toast .swal2-title {
  color: #f8fafc !important;
}
html.dark-mode .swal2-popup.swal2-modern-toast .swal2-html-container,
body.dark-mode .swal2-popup.swal2-modern-toast .swal2-html-container,
html.dark-mode .swal2-popup.bnx-swal.bnx-swal--toast .swal2-html-container,
body.dark-mode .swal2-popup.bnx-swal.bnx-swal--toast .swal2-html-container {
  color: #cbd5e1 !important;
}
html.dark-mode .swal2-popup.swal2-modern-toast .swal2-icon.swal2-success,
body.dark-mode .swal2-popup.swal2-modern-toast .swal2-icon.swal2-success,
html.dark-mode .swal2-popup.bnx-swal.bnx-swal--toast .swal2-icon.swal2-success,
body.dark-mode .swal2-popup.bnx-swal.bnx-swal--toast .swal2-icon.swal2-success {
  color: #4ade80 !important;
  background: rgba(22, 163, 74, .15) !important;
}
html.dark-mode .swal2-popup.swal2-modern-toast .swal2-icon.swal2-error,
body.dark-mode .swal2-popup.swal2-modern-toast .swal2-icon.swal2-error,
html.dark-mode .swal2-popup.bnx-swal.bnx-swal--toast .swal2-icon.swal2-error,
body.dark-mode .swal2-popup.bnx-swal.bnx-swal--toast .swal2-icon.swal2-error {
  color: #fb7185 !important;
  background: rgba(220, 38, 38, .14) !important;
}
html.dark-mode .swal2-popup.swal2-modern-toast .swal2-icon.swal2-warning,
body.dark-mode .swal2-popup.swal2-modern-toast .swal2-icon.swal2-warning,
html.dark-mode .swal2-popup.bnx-swal.bnx-swal--toast .swal2-icon.swal2-warning,
body.dark-mode .swal2-popup.bnx-swal.bnx-swal--toast .swal2-icon.swal2-warning {
  color: #fbbf24 !important;
  background: rgba(217, 119, 6, .15) !important;
}
html.dark-mode .swal2-popup.swal2-modern-toast .swal2-icon.swal2-info,
body.dark-mode .swal2-popup.swal2-modern-toast .swal2-icon.swal2-info,
html.dark-mode .swal2-popup.bnx-swal.bnx-swal--toast .swal2-icon.swal2-info,
body.dark-mode .swal2-popup.bnx-swal.bnx-swal--toast .swal2-icon.swal2-info {
  color: #60a5fa !important;
  background: rgba(37, 99, 235, .16) !important;
}
@media (max-width: 767px) {
  .swal2-popup.swal2-modern-toast,
  .swal2-popup.bnx-swal.bnx-swal--toast {
    width: min(100%, 324px) !important;
  }
}

