.system-alert-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  flex-direction: column;
  width: min(92vw, 440px);
  max-width: 440px;
  max-height: min(88vh, 640px);
  box-sizing: border-box;
  padding: 0;
  color: #1b1c20;
  background: #fff;
  border: 1px solid rgba(20, 25, 35, 0.08);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(11, 18, 32, 0.24);
  font-family: inherit;
  overflow: hidden;
}

.system-alert-dialog:not([open]) {
  display: none;
}

.system-alert-dialog[open] {
  display: flex;
}

.system-alert-dialog::backdrop {
  background: rgba(13, 19, 31, 0.58);
  backdrop-filter: blur(3px);
}

.system-alert-content {
  display: flex;
  flex: 1 1 auto;
  align-items: flex-start;
  gap: 16px;
  padding: 28px 28px 20px;
  min-height: 0;
  overflow-y: auto;
}

.system-alert-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #7f1d2d;
  font-size: 20px;
  font-weight: 800;
}

.system-alert-dialog[data-kind="error"] .system-alert-icon {
  background: #b42332;
}

.system-alert-dialog[data-kind="success"] .system-alert-icon {
  background: #168253;
}

.system-alert-copy {
  min-width: 0;
  flex: 1;
}

.system-alert-copy h2 {
  margin: 2px 0 8px;
  color: #191b21;
  font-size: 1.12rem;
  font-weight: 750;
  line-height: 1.35;
}

.system-alert-copy p {
  margin: 0;
  color: #515866;
  font-size: 0.96rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.system-alert-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px solid #a7acb5;
  border-radius: 9px;
  color: #1b1c20;
  background: #fff;
  font: inherit;
}

.system-alert-input[hidden],
.system-alert-cancel[hidden] {
  display: none;
}

.system-alert-input:focus-visible {
  outline: 3px solid #dfaa49;
  outline-offset: 2px;
}

.system-alert-input[aria-invalid="true"] {
  border-color: #b42332;
}

.system-alert-copy .system-alert-validation {
  margin-top: 8px;
  color: #b42332;
  font-size: 0.88rem;
}

.system-alert-actions {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 28px 24px;
}

.system-alert-button {
  min-width: 92px;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #7f1d2d;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}

.system-alert-button:hover {
  background: #681626;
}

.system-alert-button.system-alert-cancel {
  color: #343b49;
  background: #eef0f4;
}

.system-alert-button.system-alert-cancel:hover {
  background: #dfe3e9;
}

.system-alert-button:active {
  transform: translateY(1px);
}

.system-alert-button:focus-visible {
  outline: 3px solid #dfaa49;
  outline-offset: 3px;
}

@media (max-width: 480px) {
  .system-alert-dialog {
    border-radius: 16px;
  }

  .system-alert-content {
    gap: 12px;
    padding: 24px 22px 18px;
  }

  .system-alert-actions {
    padding: 0 22px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .system-alert-button {
    transition: none;
  }
}
