  /* Her şeyin üstünde, sağ üstte yığın */
  #toastStack{
    position:fixed; top:0; right:0; padding:12px;
    z-index:99999; pointer-events:none;
  }
  #toastStack .toast{
    pointer-events:auto; margin-bottom:10px; border:0; position:relative;
    border-radius:14px; overflow:hidden; transform-origin: top right;
    /* TYPE'a göre JS'ten gelecek değişkenler */
    background: var(--bg, #16a34a) !important;
    color: var(--fg, #fff) !important;
    box-shadow: 0 12px 36px rgba(0,0,0,.25);
  }
  /* Hafif parlama */
  #toastStack .toast::before{
    content:""; position:absolute; inset:0;
    background: radial-gradient(140% 100% at 100% -10%, rgba(255,255,255,.16), transparent 60%);
    pointer-events:none;
  }

  /* İç düzen – tam ortalı */
  #toastStack .wrap{
    display:flex; align-items:center; gap:10px;
    padding:14px 44px 14px 14px; position:relative;
  }

  /* Yaşam (kapanma) çubuğu – içeriği itmez */
  #toastStack .life{
    position:absolute; left:0; top:0; height:3px;
    background: var(--accent, rgba(0,0,0,.2));
    animation: life var(--life, 4000ms) linear forwards;
    opacity:.95;
  }

  /* Sol renk aksı */
  #toastStack .accent{
    position:absolute; left:0; top:0; bottom:0; width:4px;
    background: linear-gradient(180deg, var(--accent, rgba(0,0,0,.2)), transparent);
  }

  /* İkon kabı */
  #toastStack .icon-wrap{
    width:34px; height:34px; border-radius:999px;
    display:flex; align-items:center; justify-content:center;
    color: var(--fg, #fff);
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.24);
  }
  #toastStack .title{ font-weight:600; line-height:1.2; margin-bottom:2px; }
  #toastStack .msg{ opacity:.96; }

  /* X butonu her zaman sağ üstte, kontrast otomatik */
  #toastStack .btn-close{
    position:absolute; top:8px; right:8px; z-index:2;
    filter: invert(var(--close-invert, 1)) grayscale(100%);
    opacity:.9;
  }

  /* Giriş/çıkış animasyonları */
  #toastStack .toast.toast-in{
    animation: toastIn .45s cubic-bezier(.18,.89,.32,1.28) both;
  }
  #toastStack .toast.toast-out{
    animation: toastOut .35s cubic-bezier(.22,1,.36,1) forwards;
  }
  @keyframes toastIn{
    0%{opacity:0; transform:translateY(-8px) scale(.96); filter:blur(3px);}
    60%{filter:blur(0);}
    100%{opacity:1; transform:none;}
  }
  @keyframes toastOut{
    0%{opacity:1;}
    100%{opacity:0; transform:translateY(-8px) scale(.96); filter:blur(4px);}
  }
  @keyframes life{ from{width:100%} to{width:0} }

  /* Hareketi azalt tercihine saygı */
  @media (prefers-reduced-motion: reduce){
    #toastStack .toast{ animation:none !important; transform:none !important; filter:none !important; }
    #toastStack .life{ display:none; }
  }