#toast-container {
      position: fixed;
      top: 80px;
      right: 20px;
      z-index: 99999;
      display: flex;
      flex-direction: column;
      gap: 12px;
      pointer-events: none;
    }

    html[lang="ar"] #toast-container {
      right: auto;
      left: 20px;
    }

    .toast {
      min-width: 280px;
      max-width: 360px;
      padding: 16px 20px 16px 16px;
      border-radius: 12px;
      display: flex;
      align-items: flex-start;
      gap: 13px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.12);
      pointer-events: all;
      animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
      font-family: inherit;
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.12);
      position: relative;
      overflow: hidden;
    }

    .toast::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 4px;
      border-radius: 12px 0 0 12px;
    }

    html[lang="ar"] .toast::before {
      left: auto;
      right: 0;
      border-radius: 0 12px 12px 0;
    }

    .toast.toast-success {
      background: rgba(15, 25, 20, 0.95);
      color: #d1fae5;
    }

    .toast.toast-success::before {
      background: #10b981;
    }

    .toast.toast-error {
      background: rgba(25, 10, 12, 0.95);
      color: #fee2e2;
    }

    .toast.toast-error::before {
      background: #ef4444;
    }

    .toast.toast-info {
      background: rgba(10, 18, 30, 0.95);
      color: #dbeafe;
    }

    .toast.toast-info::before {
      background: #ffbd59;
    }

    .toast.toast-warning {
      background: rgba(25, 20, 5, 0.95);
      color: #fef3c7;
    }

    .toast.toast-warning::before {
      background: #f59e0b;
    }

    .toast-icon {
      font-size: 1.05rem;
      flex-shrink: 0;
      margin-top: 2px;
      width: 20px;
      text-align: center;
      line-height: 1;
    }

    .toast-body {
      flex: 1;
    }

    .toast-title {
      font-weight: 700;
      font-size: 0.95rem;
      margin-bottom: 3px;
      line-height: 1.3;
    }

    .toast-msg {
      font-size: 0.85rem;
      opacity: 0.85;
      line-height: 1.4;
    }

    .toast-close {
      background: none;
      border: none;
      cursor: pointer;
      color: inherit;
      opacity: 0.5;
      font-size: 1.1rem;
      padding: 0;
      flex-shrink: 0;
      transition: opacity 0.2s;
      align-self: flex-start;
    }

    .toast-close:hover {
      opacity: 1;
    }

    .toast-progress {
      position: absolute;
      bottom: 0;
      left: 4px;
      right: 0;
      height: 3px;
      background: rgba(255, 255, 255, 0.15);
      border-radius: 0 0 12px 0;
    }

    .toast-progress-bar {
      height: 100%;
      border-radius: inherit;
      transition: width linear;
    }

    .toast.toast-success .toast-progress-bar {
      background: #10b981;
    }

    .toast.toast-error .toast-progress-bar {
      background: #ef4444;
    }

    .toast.toast-info .toast-progress-bar {
      background: #ffbd59;
    }

    .toast.toast-warning .toast-progress-bar {
      background: #f59e0b;
    }

    .toast.toast-hide {
      animation: toastOut 0.35s ease forwards;
    }

    @keyframes toastIn {
      from {
        opacity: 0;
        transform: translateX(50px) scale(0.92);
      }

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

    html[lang="ar"] .toast {
      animation-name: toastInAr;
    }

    @keyframes toastInAr {
      from {
        opacity: 0;
        transform: translateX(-50px) scale(0.92);
      }

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

    @keyframes toastOut {
      from {
        opacity: 1;
        transform: scale(1);
      }

      to {
        opacity: 0;
        transform: scale(0.88);
      }
    }