/* Palm Medical — Toast & CRUD modal */
#pm-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.pm-toast {
  pointer-events: auto;
  min-width: 300px;
  max-width: 420px;
  padding: 14px 18px;
  border-radius: 12px;
  color: #fff;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 12px 40px rgba(49, 75, 113, 0.25);
  animation: pmToastIn 0.35s ease;
  font-size: 0.92rem;
  line-height: 1.45;
}

.pm-toast i { font-size: 1.15rem; margin-top: 2px; flex-shrink: 0; }
.pm-toast strong { display: block; font-weight: 700; margin-bottom: 2px; }

.pm-toast--success { background: linear-gradient(135deg, #059669, #10B981); }
.pm-toast--error { background: linear-gradient(135deg, #DC2626, #EF4444); }
.pm-toast--warning { background: linear-gradient(135deg, #D97706, #F59E0B); }
.pm-toast--info { background: linear-gradient(135deg, #2E6194, #529CA7); }

@keyframes pmToastIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pmToastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(24px); }
}

.pm-toast.pm-toast--out { animation: pmToastOut 0.3s ease forwards; }

.dt-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.dt-actions .btn-icon { margin: 0; }

/* CRUD modal (replaces SweetAlert) */
#pm-crud-modal-root { position: relative; z-index: 10060; }

.pm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pm-modal-overlay.active { opacity: 1; }

.pm-modal {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(49, 75, 113, 0.28);
  font-family: Inter, system-ui, sans-serif;
  transform: translateY(8px);
  transition: transform 0.2s ease;
}

.pm-modal-overlay.active .pm-modal { transform: translateY(0); }

.pm-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
  border-bottom: 1px solid #EEF2F7;
}

.pm-modal__header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1F2937;
}

.pm-modal__close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: #9CA3AF;
  cursor: pointer;
  padding: 0 4px;
}

.pm-modal__close:hover { color: #374151; }

.pm-modal__body {
  padding: 16px 20px;
  color: #374151;
  font-size: 0.92rem;
  line-height: 1.55;
}

.pm-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px 18px;
  border-top: 1px solid #EEF2F7;
}

.pm-modal-hint {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: #6B7280;
}

.pm-modal--danger .pm-modal__header h3 { color: #DC2626; }

.pm-form { text-align: left; }
.pm-form-field { display: block; margin-bottom: 12px; }
.pm-form-field span { display: block; font-size: 0.82rem; font-weight: 600; color: #314B71; margin-bottom: 4px; }
.pm-form-field .form-control {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  font-size: 0.9rem;
  padding: 8px 12px;
}

.pm-detail { text-align: left; font-size: 0.92rem; color: #374151; line-height: 1.6; }
.pm-detail p { margin: 0 0 10px; }

.btn-success { background: #059669; color: #fff; }
.btn-success:hover { background: #047857; }

[data-crud-action="approve"] { color: #059669 !important; }
[data-crud-action="reject"] { color: #DC2626 !important; }
