/* ========================================================
   TOAST NOTIFICATION SYSTEM — PREMIUM V3
   ======================================================== */

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

.glass-toast {
    pointer-events: auto;
    background: #ffffff;
    border-radius: 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    min-width: 340px;
    max-width: 440px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.07),
        0 10px 30px -5px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.04);
    animation: toastSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    border-left: 4px solid transparent;
}

/* ── Accent colors ── */
.glass-toast.success {
    border-left-color: #10b981;
}

.glass-toast.error {
    border-left-color: #ef4444;
}

.glass-toast.info {
    border-left-color: #3b82f6;
}

.glass-toast.warning {
    border-left-color: #f59e0b;
}

/* ── Icon bubble ── */
.toast-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glass-toast.success .toast-icon {
    background: #d1fae5;
    color: #059669;
}

.glass-toast.error .toast-icon {
    background: #fee2e2;
    color: #dc2626;
}

.glass-toast.info .toast-icon {
    background: #dbeafe;
    color: #2563eb;
}

.glass-toast.warning .toast-icon {
    background: #fef3c7;
    color: #d97706;
}

/* ── Content ── */
.toast-content {
    flex: 1;
    min-width: 0;
    padding-top: 1px;
}

.toast-content h4 {
    margin: 0 0 3px 0;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    font-family: 'Montserrat', sans-serif;
}

.toast-content p {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    line-height: 1.5;
    font-family: 'Montserrat', sans-serif;
    overflow-wrap: break-word;
}

/* ── Close button ── */
.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 2px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
    margin-top: 1px;
    align-self: flex-start;
}

.toast-close:hover {
    color: #64748b;
    background: #f1f5f9;
}

/* ── Progress bar ── */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 16px 16px;
    animation: toastProgress var(--duration, 4000ms) linear forwards;
}

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

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

.glass-toast.info .toast-progress {
    background: #3b82f6;
}

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

/* ── Animations ── */
@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(calc(100% + 28px)) scale(0.96);
    }

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

@keyframes fadeOutRight {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateX(110%) scale(0.95);
    }
}

@keyframes toastProgress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}
/* ========================================================
   CUSTOM CONFIRM MODAL
   ======================================================== */
.lm-confirm-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    z-index: 100000; display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s ease;
}
.lm-confirm-overlay.active { opacity: 1; }
.lm-confirm-box {
    background: #fff; border-radius: 20px; width: 90%; max-width: 400px; padding: 32px; text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    transform: scale(0.95); transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.lm-confirm-overlay.active .lm-confirm-box { transform: scale(1); }
.lm-confirm-icon {
    width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px;
}
.lm-confirm-icon.warning { background: #fef3c7; color: #d97706; }
.lm-confirm-icon.danger { background: #fee2e2; color: #dc2626; }
.lm-confirm-title { font-size: 20px; font-weight: 800; color: #0f172a; margin-bottom: 12px; font-family: 'Outfit', sans-serif; }
.lm-confirm-text { font-size: 14px; color: #64748b; line-height: 1.5; margin-bottom: 24px; font-family: 'Montserrat', sans-serif; }
.lm-confirm-actions { display: flex; gap: 12px; }
.lm-confirm-btn { flex: 1; padding: 14px; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer; transition: all 0.2s; border: none; font-family: 'Outfit', sans-serif; }
.lm-confirm-btn-cancel { background: #f1f5f9; color: #475569; }
.lm-confirm-btn-cancel:hover { background: #e2e8f0; color: #0f172a; }
.lm-confirm-btn-confirm { background: var(--lm-blue, #1e56cb); color: #fff; }
.lm-confirm-btn-confirm:hover { filter: brightness(0.9); transform: translateY(-2px); }
.lm-confirm-btn-confirm.danger { background: #ef4444; }

/* ====== LM Confirm Overlay CSS (Ported from lmpass-base.css) ====== */
#lm-confirm-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); backdrop-filter: blur(4px); z-index: 9990; display: none; align-items: center; justify-content: center; }
#lm-confirm-overlay.show { display: flex; }
#lm-confirm-box { background: #fff; border-radius: 18px; padding: 28px 28px 24px; max-width: 400px; width: 90%; box-shadow: 0 20px 60px rgba(0, 0, 0, .18); animation: popIn .18s ease; }
@keyframes popIn { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#lm-confirm-icon { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; background: var(--danger-light); color: var(--danger); }
#lm-confirm-title { font-size: 16px; font-weight: 800; color: var(--g900); margin-bottom: 6px; }
#lm-confirm-msg { font-size: 13px; color: var(--g600); line-height: 1.55; margin-bottom: 22px; }
#lm-confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }
