.app-toast{
  position: fixed;
  left: 50%;
  top: 96px; /* below topbar */
  transform: translateX(-50%);
  z-index: 2000;
  max-width: min(720px, calc(100vw - 32px));
  cursor: pointer;
}

/* When mounted inside auth card (login/register), behave like the reference banner */
.app-toast.is-in-card{
  position: absolute;
  left: 50%;
  top: -18px;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  z-index: 30;
}

.app-toast .app-toast-inner{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  box-shadow: 0 14px 40px rgba(17, 24, 39, .14);
  border: 1px solid rgba(15, 23, 42, .08);
  background: #ffffff;
}

/* Banner-like (figure4) */
.app-toast.is-error .app-toast-inner{
  background: #ef4444;
  border-color: rgba(239, 68, 68, .18);
}
.app-toast.is-success .app-toast-inner{
  background: #22c55e;
  border-color: rgba(34, 197, 94, .18);
}
.app-toast.is-info .app-toast-inner{
  background: #ffffff;
  border-color: rgba(15, 23, 42, .10);
}

.app-toast .app-toast-icon{
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: rgba(255,255,255,.22);
}
.app-toast.is-info .app-toast-icon{ background: rgba(59,130,246,.14); }

.app-toast .app-toast-icon::before{
  content: "";
  width: 12px;
  height: 12px;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}
.app-toast.is-error .app-toast-icon::before{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' d='M11 7h2v7h-2V7zm0 9h2v2h-2v-2z'/%3E%3C/svg%3E");
}
.app-toast.is-success .app-toast-icon::before{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' d='M9.55 17.3 4.8 12.55l1.4-1.4 3.35 3.35 8.25-8.25 1.4 1.4-9.65 9.65z'/%3E%3C/svg%3E");
}
.app-toast.is-info .app-toast-icon::before{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%232f6fec' d='M11 10h2v8h-2v-8zm0-4h2v2h-2V6z'/%3E%3C/svg%3E");
}

.app-toast .app-toast-text{
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
  white-space: nowrap;
}
.app-toast.is-error .app-toast-text,
.app-toast.is-success .app-toast-text{ color: #ffffff; }
.app-toast.is-info .app-toast-text{ color: rgba(15,23,42,.82); }

@media (max-width: 576px){
  .app-toast{ top: 84px; }
  .app-toast .app-toast-text{ white-space: normal; }
}
