.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(6px);
  animation: modalBg var(--t-med) var(--ease-out);
}

@keyframes modalBg {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal[hidden] {
  display: none !important;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin-top: 5vh;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  animation: modalPop var(--t-med) var(--ease-out);
  overflow: hidden;
}

.modal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border-strong);
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-card h2 {
  font-size: 1.25rem;
}

.modal-severity {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: var(--warning-bg);
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
}

.modal-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal-actions .btn {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.modal-actions .cr-desc {
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
