.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(12px);
  padding: 20px;
  animation: fade-in 0.3s ease-out;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  max-width: 460px;
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 32px;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  animation: scale-up 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scale-up {
  from { transform: scale(0.94) translateY(15px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.modal p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.modal > div {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
}

/* Modal action buttons */
.modal button {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--border-card);
}

.modal button:first-child {
  background: #ffffff;
  color: var(--text-secondary);
}

.modal button:first-child:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary-hover);
  transform: translateY(-1px);
}

.modal button.danger, .modal button:last-child:not(:first-child) {
  background: var(--color-no);
  border-color: var(--color-no-border);
  color: #ffffff;
  box-shadow: 0 6px 20px -4px rgba(239, 68, 68, 0.3);
}

.modal button.danger:hover, .modal button:last-child:not(:first-child):hover {
  background: var(--color-no-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -4px rgba(239, 68, 68, 0.4);
}

/* Test Action Card in questionnaire */
.test-action {
  margin: 32px 0 48px;
  padding: 28px;
  text-align: center;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--shadow-md);
}

.test-action .save {
  margin: 0;
  background: var(--primary);
  box-shadow: 0 8px 24px -4px rgba(59, 130, 246, 0.3);
}

.test-action .save:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -4px rgba(59, 130, 246, 0.4);
}

.test-action small {
  display: block;
  margin-top: 14px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
}
