* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #f8f9fa;
  color: #2c3e50;
  line-height: 1.6;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.app-alert-root {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
}

.app-alert-root.is-visible {
  display: flex;
}

.app-alert-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 28, 45, 0.44);
  backdrop-filter: blur(5px);
}

.app-alert-card {
  position: relative;
  width: min(460px, 100%);
  padding: 28px 24px 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 24px 64px rgba(15, 37, 58, 0.22);
  border: 1px solid rgba(44, 103, 148, 0.12);
  text-align: center;
  animation: appAlertEnter 0.22s ease-out;
}

.app-alert-dismiss {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 12px;
  background: rgba(44, 103, 148, 0.08);
  color: #53728e;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.app-alert-dismiss:hover {
  background: rgba(44, 103, 148, 0.16);
  transform: translateY(-1px);
}

.app-alert-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #ffffff;
  background: linear-gradient(135deg, #2f80ed 0%, #45b7d1 100%);
  box-shadow: 0 16px 28px rgba(47, 128, 237, 0.28);
}

.app-alert-card[data-tone="success"] .app-alert-icon {
  background: linear-gradient(135deg, #27ae60 0%, #6fcf97 100%);
  box-shadow: 0 16px 28px rgba(39, 174, 96, 0.28);
}

.app-alert-card[data-tone="warning"] .app-alert-icon {
  background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
  box-shadow: 0 16px 28px rgba(243, 156, 18, 0.28);
}

.app-alert-card[data-tone="error"] .app-alert-icon {
  background: linear-gradient(135deg, #eb5757 0%, #c0392b 100%);
  box-shadow: 0 16px 28px rgba(192, 57, 43, 0.28);
}

.app-alert-title {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.25;
  color: #17324d;
}

.app-alert-message {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: #4f6477;
}

.app-alert-button {
  margin-top: 20px;
  min-width: 140px;
  padding: 12px 18px;
  border: none;
  border-radius: 14px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #2f80ed 0%, #45b7d1 100%);
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(47, 128, 237, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-alert-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(47, 128, 237, 0.26);
}

.app-confirm-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.app-confirm-button {
  flex: 1 1 0;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 14px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.app-confirm-button:hover {
  transform: translateY(-1px);
}

.app-confirm-button.is-secondary {
  background: #edf3f9;
  color: #476179;
}

.app-confirm-button.is-secondary:hover {
  background: #e1ebf4;
}

.app-confirm-button.is-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
  box-shadow: 0 12px 24px rgba(243, 156, 18, 0.22);
}

.app-confirm-button.is-primary:hover {
  box-shadow: 0 16px 28px rgba(243, 156, 18, 0.28);
}

.app-alert-card[data-tone="success"] .app-alert-button {
  background: linear-gradient(135deg, #27ae60 0%, #6fcf97 100%);
  box-shadow: 0 12px 24px rgba(39, 174, 96, 0.22);
}

.app-alert-card[data-tone="warning"] .app-alert-button {
  background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
  box-shadow: 0 12px 24px rgba(243, 156, 18, 0.22);
}

.app-alert-card[data-tone="error"] .app-alert-button {
  background: linear-gradient(135deg, #eb5757 0%, #c0392b 100%);
  box-shadow: 0 12px 24px rgba(192, 57, 43, 0.22);
}

@keyframes appAlertEnter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 600px) {
  .app-alert-root {
    padding: 14px;
  }

  .app-alert-card {
    padding: 24px 18px 18px;
    border-radius: 20px;
  }

  .app-alert-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    font-size: 24px;
  }

  .app-alert-title {
    font-size: 22px;
  }

  .app-alert-message {
    font-size: 14px;
  }

  .app-alert-button {
    width: 100%;
  }

  .app-confirm-actions {
    flex-direction: column-reverse;
  }
}
