/* Smart Ledger toast notifications (jGrowl) */
.jGrowl.top-left {
    top: 1.25rem;
    left: 1.25rem;
    width: min(390px, calc(100vw - 2rem));
    z-index: 1085;
}

.jGrowl .jGrowl-notification.sl-toast {
    position: relative;
    width: 100%;
    min-height: 78px;
    margin: 0 0 .75rem;
    padding: 1rem 3.15rem 1rem 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .18);
    border-right: 5px solid rgba(255, 255, 255, .72);
    border-radius: 12px;
    direction: rtl;
    text-align: right;
    color: #fff;
    background: linear-gradient(135deg, var(--toast-bg), var(--toast-bg-dark));
    box-shadow: 0 14px 38px rgba(15, 23, 42, .25), 0 3px 10px rgba(15, 23, 42, .12);
    box-shadow: 0 14px 38px color-mix(in srgb, var(--toast-bg-dark) 32%, transparent), 0 3px 10px rgba(15, 23, 42, .12);
}

.jGrowl .sl-toast::before {
    position: absolute;
    top: 1rem;
    right: .9rem;
    display: grid;
    width: 1.65rem;
    height: 1.65rem;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, .2);
    font-family: Icomoon;
    font-size: .82rem;
    font-weight: 400;
    content: var(--toast-icon);
}

.jGrowl .sl-toast-success { --toast-bg: #16a34a; --toast-bg-dark: #166534; --toast-icon: "\ed6f"; }
.jGrowl .sl-toast-error { --toast-bg: #dc2626; --toast-bg-dark: #991b1b; --toast-icon: "\ed68"; }
.jGrowl .sl-toast-warning { --toast-bg: #f59e0b; --toast-bg-dark: #b45309; --toast-icon: "\ed68"; }
.jGrowl .sl-toast-info { --toast-bg: #0ea5e9; --toast-bg-dark: #0369a1; --toast-icon: "\ec50"; }

/* Exception-specific panels */
.jGrowl .sl-toast-database_error { --toast-bg: #b91c1c; --toast-bg-dark: #450a0a; }
.jGrowl .sl-toast-system_error,
.jGrowl .sl-toast-client_error { --toast-bg: #ef4444; --toast-bg-dark: #991b1b; }
.jGrowl .sl-toast-validation_error,
.jGrowl .sl-toast-bad_request { --toast-bg: #f59e0b; --toast-bg-dark: #b45309; }
.jGrowl .sl-toast-business_error { --toast-bg: #f97316; --toast-bg-dark: #c2410c; }
.jGrowl .sl-toast-accounting_error { --toast-bg: #8b5cf6; --toast-bg-dark: #5b21b6; }
.jGrowl .sl-toast-cash_register_error { --toast-bg: #0891b2; --toast-bg-dark: #155e75; }
.jGrowl .sl-toast-currency_error { --toast-bg: #3b82f6; --toast-bg-dark: #1d4ed8; }
.jGrowl .sl-toast-database_backup_error { --toast-bg: #dc2626; --toast-bg-dark: #7f1d1d; }
.jGrowl .sl-toast-document_error,
.jGrowl .sl-toast-document_archive_error { --toast-bg: #64748b; --toast-bg-dark: #334155; }
.jGrowl .sl-toast-expense_error { --toast-bg: #db2777; --toast-bg-dark: #9d174d; }
.jGrowl .sl-toast-financial_account_error { --toast-bg: #6366f1; --toast-bg-dark: #4338ca; }
.jGrowl .sl-toast-product_error { --toast-bg: #ca8a04; --toast-bg-dark: #854d0e; }
.jGrowl .sl-toast-report_error { --toast-bg: #0284c7; --toast-bg-dark: #075985; }
.jGrowl .sl-toast-sales_error { --toast-bg: #e11d48; --toast-bg-dark: #9f1239; }
.jGrowl .sl-toast-supplier_error { --toast-bg: #f97316; --toast-bg-dark: #c2410c; }
.jGrowl .sl-toast-correction_error { --toast-bg: #d97706; --toast-bg-dark: #92400e; }
.jGrowl .sl-toast-treasury_error { --toast-bg: #0891b2; --toast-bg-dark: #155e75; }
.jGrowl .sl-toast-wagon_error { --toast-bg: #475569; --toast-bg-dark: #1e293b; }
.jGrowl .sl-toast-warehouse_error { --toast-bg: #2563eb; --toast-bg-dark: #1e40af; }
.jGrowl .sl-toast-access_denied,
.jGrowl .sl-toast-unauthorized { --toast-bg: #9333ea; --toast-bg-dark: #6b21a8; }
.jGrowl .sl-toast-not_found { --toast-bg: #0ea5e9; --toast-bg-dark: #0369a1; }
.jGrowl .sl-toast-conflict,
.jGrowl .sl-toast-database_conflict { --toast-bg: #e11d48; --toast-bg-dark: #9f1239; }
.jGrowl .sl-toast-timeout,
.jGrowl .sl-toast-request_cancelled { --toast-bg: #ea580c; --toast-bg-dark: #9a3412; }
.jGrowl .sl-toast-network_error { --toast-bg: #64748b; --toast-bg-dark: #334155; }

.jGrowl .sl-toast .jGrowl-header {
    margin: 0 0 .3rem;
    color: #fff;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.5;
}

.jGrowl .sl-toast .jGrowl-message {
    color: rgba(255, 255, 255, .9);
    font-size: .86rem;
    font-weight: 400;
    line-height: 1.7;
}

.jGrowl .sl-toast .sl-toast-reference {
    display: block;
    margin-top: .35rem;
    color: rgba(255, 255, 255, .68);
    direction: ltr;
    font-size: .7rem;
    text-align: right;
}

.jGrowl .sl-toast .jGrowl-close {
    position: absolute;
    top: .55rem;
    left: .65rem;
    width: 1.75rem;
    height: 1.75rem;
    margin: 0;
    border-radius: 50%;
    color: rgba(255, 255, 255, .72);
    font-size: 1.1rem;
    transition: color .15s ease, background-color .15s ease;
}

.jGrowl .sl-toast .jGrowl-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, .18);
}

@media (max-width: 575.98px) {
    .jGrowl.top-left {
        top: .75rem;
        right: .75rem;
        left: .75rem;
        width: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jGrowl .jGrowl-notification.sl-toast {
        animation: none !important;
    }
}
