body.mondo-dialog-open {
  overflow: hidden;
}

.mondo-dialog-overlay,
.admin-user-modal-overlay,
.user-delete-confirm-modal,
.modal,
#planModal,
#customRenameModal,
#customQRCodeModal,
#customQRModal,
body > [class~="fixed"][class~="inset-0"][class~="bg-black/60"][class~="backdrop-blur-sm"] {
  box-sizing: border-box;
  background-color: rgba(15, 23, 42, 0.68) !important;
  backdrop-filter: blur(7px) saturate(115%);
  -webkit-backdrop-filter: blur(7px) saturate(115%);
}

.mondo-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 24px;
  animation: mondo-modal-backdrop-in 160ms ease-out both;
}

.mondo-dialog {
  box-sizing: border-box;
  width: min(100%, 460px);
  max-height: min(90vh, 760px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #fff;
  color: #1e293b;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.3);
  animation: mondo-modal-card-in 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.mondo-dialog-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mondo-dialog-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
}

.mondo-dialog-icon svg {
  width: 22px;
  height: 22px;
}

.mondo-dialog-icon-primary {
  background: #eff6ff;
  color: #2563eb;
}

.mondo-dialog-icon-danger {
  background: #fff1f2;
  color: #dc2626;
}

.mondo-dialog-title {
  margin: 0;
  color: #0f172a;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
}

.mondo-dialog-content {
  margin-top: 16px;
}

.mondo-dialog-message {
  margin: 0;
  color: #475569;
  font-size: 0.94rem;
  line-height: 1.65;
  white-space: pre-line;
}

.mondo-dialog-input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  resize: vertical;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.mondo-dialog-input:focus {
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.mondo-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.mondo-dialog-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 11px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.mondo-dialog-button:hover {
  transform: translateY(-1px);
}

.mondo-dialog-button:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.25);
  outline-offset: 2px;
}

.mondo-dialog-cancel {
  border-color: #dbe3ed;
  background: #fff;
  color: #334155;
}

.mondo-dialog-cancel:hover {
  background: #f8fafc;
}

.mondo-dialog-confirm-primary {
  background: #2563eb;
  color: #fff;
}

.mondo-dialog-confirm-primary:hover {
  background: #1d4ed8;
}

.mondo-dialog-confirm-danger {
  background: #dc2626;
  color: #fff;
}

.mondo-dialog-confirm-danger:hover {
  background: #b91c1c;
}

.mondo-dialog-button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.admin-user-modal,
.user-delete-confirm-card,
.modal-dialog,
#planModal > div:first-child,
#customRenameModal > div,
#customQRCodeModal > div,
#customQRModal > div,
#uploadModal > div:last-child > div,
.dashboard-share-modal,
body > [class~="fixed"][class~="inset-0"][class~="bg-black/60"][class~="backdrop-blur-sm"] > div:not([class~="absolute"]) {
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px !important;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.28) !important;
  animation: mondo-modal-card-in 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.admin-user-modal-overlay {
  z-index: 2147482000 !important;
}

.user-delete-confirm-card,
.admin-user-modal,
.modal-dialog,
#planModal > div:first-child,
#customRenameModal > div,
#customQRCodeModal > div,
#customQRModal > div,
#uploadModal > div:last-child > div,
.dashboard-share-modal,
body > [class~="fixed"][class~="inset-0"][class~="bg-black/60"][class~="backdrop-blur-sm"] > div:not([class~="absolute"]) {
  max-width: min(100%, 560px);
  max-height: min(90vh, 780px);
  overflow: auto;
}

.admin-user-modal,
.modal-dialog {
  background: #fff !important;
  color: #1e293b !important;
}

.modal-header,
.modal-footer {
  border-color: #e8edf3 !important;
}

.modal-title {
  color: #0f172a !important;
  font-weight: 700 !important;
}

.modal-content {
  border: 0 !important;
  background: #fff !important;
}

@keyframes mondo-modal-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes mondo-modal-card-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 540px) {
  .mondo-dialog-overlay {
    align-items: flex-end;
    padding: 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .mondo-dialog {
    width: 100%;
    max-height: min(88vh, 760px);
    padding: 20px;
    border-radius: 20px;
  }

  .mondo-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 20px;
  }

  .mondo-dialog-button {
    width: 100%;
  }

  .admin-user-modal,
  .user-delete-confirm-card,
  .modal-dialog,
  #planModal > div:first-child,
  #customRenameModal > div,
  #customQRCodeModal > div,
  #customQRModal > div,
  #uploadModal > div:last-child > div,
  .dashboard-share-modal,
  body > [class~="fixed"][class~="inset-0"][class~="bg-black/60"][class~="backdrop-blur-sm"] > div:not([class~="absolute"]) {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 90dvh !important;
    margin: 0 !important;
    border-radius: 20px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mondo-dialog-overlay,
  .mondo-dialog,
  .admin-user-modal,
  .user-delete-confirm-card,
  .modal-dialog,
  #planModal > div:first-child,
  #customRenameModal > div,
  #customQRCodeModal > div,
  #customQRModal > div,
  #uploadModal > div:last-child > div,
  .dashboard-share-modal {
    animation-duration: 1ms !important;
  }
}
