.toast-container {
    position: fixed;
    top: 74px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 340px;
    width: 100%;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 15px;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 500;
    width: 100%;
    pointer-events: all;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    backdrop-filter: blur(12px);
    animation: toastIn .35s cubic-bezier(.34,1.4,.64,1) forwards;
    border: 1px solid transparent;
}

.toast.hide {
    animation: toastOut .25s ease forwards;
}

/* types */
.toast-success {
    background: rgba(14,17,24,.95);
    border-color: rgba(52,211,153,.25);
    box-shadow: 0 8px 32px rgba(0,0,0,.4), 0 0 0 1px rgba(52,211,153,.1);
}
.toast-error {
    background: rgba(14,17,24,.95);
    border-color: rgba(248,113,113,.25);
    box-shadow: 0 8px 32px rgba(0,0,0,.4), 0 0 0 1px rgba(248,113,113,.1);
}
.toast-warn {
    background: rgba(14,17,24,.95);
    border-color: rgba(251,191,36,.25);
    box-shadow: 0 8px 32px rgba(0,0,0,.4), 0 0 0 1px rgba(251,191,36,.1);
}
.toast-info {
    background: rgba(14,17,24,.95);
    border-color: rgba(59,130,246,.25);
    box-shadow: 0 8px 32px rgba(0,0,0,.4), 0 0 0 1px rgba(59,130,246,.1);
}

/* icon circle */
.toast-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}
.toast-success .toast-icon { background: rgba(52,211,153,.15);  color: #34d399; }
.toast-error   .toast-icon { background: rgba(248,113,113,.15); color: #f87171; }
.toast-warn    .toast-icon { background: rgba(251,191,36,.15);  color: #fbbf24; }
.toast-info    .toast-icon { background: rgba(59,130,246,.15);  color: #60a5fa; }

.toast-body { flex: 1; min-width: 0; }

.toast-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .3px;
    margin-bottom: 2px;
}
.toast-success .toast-title { color: #34d399; }
.toast-error   .toast-title { color: #f87171; }
.toast-warn    .toast-title { color: #fbbf24; }
.toast-info    .toast-title { color: #60a5fa; }

.toast-msg {
    color: #cbd5e1;
    line-height: 1.5;
    font-size: 13px;
    word-break: break-word;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #475569;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    transition: color .15s;
    margin-top: 1px;
}
.toast-close:hover { color: #94a3b8; }

/* progress bar */
.toast-bar {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 2px;
    border-radius: 0 0 12px 12px;
    animation: toastBar var(--duration, 4s) linear forwards;
}
.toast-success .toast-bar { background: #34d399; }
.toast-error   .toast-bar { background: #f87171; }
.toast-warn    .toast-bar { background: #fbbf24; }
.toast-info    .toast-bar { background: #60a5fa; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(50px) scale(.95); }
    to   { opacity: 1; transform: translateX(0)    scale(1);   }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0)    scale(1);   max-height: 100px; margin-bottom: 0; }
    to   { opacity: 0; transform: translateX(50px) scale(.95); max-height: 0;     margin-bottom: -10px; padding: 0; }
}

@keyframes toastBar {
    from { width: 100%; }
    to   { width: 0%;   }
}

@media(max-width: 480px) {
    .toast-container { right: 10px; left: 10px; max-width: unset; }
}
