.toast-container {
    top: 4.25rem !important;
    width: min(430px, calc(100vw - 1rem));
}

.app-toast {
    position: relative;
    width: 100%;
    max-width: 430px;
    box-shadow: 0 0.75rem 1.75rem rgba(15, 23, 42, 0.22);
}

.app-toast .toast-body {
    flex: 1;
    min-width: 0;
    padding: 0.85rem 0.75rem;
    padding-right: calc(44px + 0.5rem);
}

.app-toast-close {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
}

.app-toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    padding: 0.85rem 0 0 0.85rem;
    font-size: 1.2rem;
}

.app-toast-title {
    margin-bottom: 0.2rem;
}

.app-toast-identifier {
    margin-bottom: 0.2rem;
    font-size: 0.78rem;
    font-weight: 700;
    opacity: 0.92;
    overflow-wrap: anywhere;
}

.app-toast-message {
    line-height: 1.4;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.app-toast-persistent {
    border-left: 0.35rem solid rgba(255, 255, 255, 0.85) !important;
}

.app-notification-toggle {
    position: relative;
    display: inline-flex;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: none;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.app-notification-toggle:hover,
.app-notification-toggle:focus,
.app-notification-toggle.show {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
}

.app-notification-toggle .bi-bell {
    font-size: 1.15rem;
}

.app-notification-badge {
    position: absolute;
    top: -0.2rem;
    right: -0.25rem;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.28rem;
    border: 2px solid var(--theme-header-red);
    border-radius: 999px;
    background: #fff;
    color: var(--theme-header-red-dark);
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1rem;
    text-align: center;
}

.app-notification-center {
    --bs-offcanvas-width: min(440px, 100vw);
    width: min(440px, 100vw);
    border-left: 0;
    background: #f7f9fb;
}

.app-notification-center .offcanvas-header {
    align-items: flex-start;
    padding: 1.1rem 1.15rem;
    border-bottom: 0;
    background: linear-gradient(135deg, var(--theme-header-red-dark), var(--theme-header-red));
    box-shadow: 0 0.3rem 0.85rem rgba(71, 20, 25, 0.22);
    color: #fff;
}

.app-notification-heading {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.app-notification-heading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 1.15rem;
}

.app-notification-title {
    margin: 0;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
}

.app-notification-subtitle {
    margin-top: 0.15rem;
    color: #fff;
    font-size: 0.78rem;
}

.app-notification-header-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.app-notification-clear {
    padding: 0.3rem 0.5rem;
    border-radius: 7px;
    color: #fff;
    font-size: 0.78rem;
    text-decoration: none;
}

.app-notification-clear:hover,
.app-notification-clear:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

.app-notification-clear:disabled {
    visibility: hidden;
}

.app-notification-center .offcanvas-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.9;
}

.app-notification-center .offcanvas-header .btn-close:hover,
.app-notification-center .offcanvas-header .btn-close:focus {
    opacity: 1;
}

.app-notification-center .offcanvas-body {
    padding: 0;
}

.app-notification-list {
    display: flex;
    flex-direction: column;
}

.app-notification-item {
    position: relative;
    display: grid;
    grid-template-columns: 2.35rem minmax(0, 1fr) 1.75rem;
    gap: 0.75rem;
    padding: 1rem 0.85rem 1rem 1rem;
    border-bottom: 1px solid #e2e7ed;
    background: #fff;
}

.app-notification-item.is-unread {
    background: #f0f7ff;
}

.app-notification-item.is-unread::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: #2979c7;
    content: "";
}

.app-notification-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 50%;
    font-size: 1rem;
}

.app-notification-item-success .app-notification-item-icon {
    background: #e8f6ed;
    color: #198754;
}

.app-notification-item-info .app-notification-item-icon {
    background: #e7f5fa;
    color: #0a6f88;
}

.app-notification-item-warning .app-notification-item-icon {
    background: #fff4d6;
    color: #9a6700;
}

.app-notification-item-danger .app-notification-item-icon {
    background: #fde9eb;
    color: #c52d37;
}

.app-notification-item-content {
    min-width: 0;
}

.app-notification-item-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.app-notification-item-title {
    color: #263449;
    font-size: 0.88rem;
}

.app-notification-item-date {
    flex-shrink: 0;
    color: #778195;
    font-size: 0.75rem;
}

.app-notification-item-message {
    margin-top: 0.3rem;
    color: #4a5568;
    font-size: 0.82rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.app-notification-item-identifier {
    display: inline-flex;
    max-width: 100%;
    margin-top: 0.3rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #edf1f5;
    color: #344054;
    font-size: 0.7rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.app-notification-item-remove {
    align-self: start;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border-radius: 50%;
    color: #8791a2;
    font-size: 0.72rem;
}

.app-notification-item-remove:hover,
.app-notification-item-remove:focus {
    color: #b4232c;
    background: #fde9eb;
}

.app-notification-empty {
    padding: 4rem 1.5rem;
    color: #7b8494;
    text-align: center;
}

.app-notification-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: #e9eef4;
    color: #718096;
    font-size: 1.6rem;
}

.app-notification-empty-title {
    color: #344054;
    font-weight: 700;
}

.app-notification-empty-text {
    max-width: 280px;
    margin: 0.35rem auto 0;
    font-size: 0.82rem;
    line-height: 1.45;
}

@media (max-width: 575.98px) {
    .toast-container {
        top: 4rem !important;
        right: 0 !important;
        left: 0 !important;
        width: 100%;
        padding: 0.5rem !important;
    }

    .app-toast {
        max-width: none;
    }

    .app-notification-center {
        width: 100vw;
    }
}
