/* === modal === */

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 40%);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.modal-backdrop.modal-open {
  display: flex;
}

.modal {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgb(0 0 0 / 15%);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modal-in 0.2s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: var(--grey-100);
  color: var(--text);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--grey-50);
  border-radius: 0 0 var(--radius) var(--radius);
}

.required {
  color: var(--danger);
}
