.notification-center {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.workspace .notification-bell {
    position: relative;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #24533e;
}

.notification-bell:hover {
    background: #eef6f1;
}

.notification-count {
    position: absolute;
    top: -2px;
    right: -3px;
    min-width: 19px;
    padding: 1px 5px;
    border: 2px solid #fff;
    border-radius: 12px;
    background: #b63b32;
    color: white;
    font-size: 10px;
    line-height: 15px;
}

.notification-panel {
    position: fixed;
    inset: 76px 20px 20px auto;
    margin: 0;
    width: min(430px, calc(100vw - 32px));
    height: calc(100dvh - 96px);
    max-height: none;
    max-width: none;
    padding: 0;
    border: 1px solid #dae5dd;
    border-radius: 16px;
    box-shadow: 0 20px 65px #15362533;
    background: #fff;
    color: #203b30;
}

.notification-panel[open] {
    display: flex;
    flex-direction: column;
}

.notification-panel::backdrop {
    background: #102c222b;
}

.notification-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 22px 20px 16px;
    border-bottom: 1px solid #e4ece6;
}

.workspace .notification-heading h2 {
    font-size: 20px;
    margin: 0 0 5px;
}

.workspace .notification-close {
    padding: 6px 9px;
    min-height: 36px;
    border: 0;
    background: none;
    color: #436452;
    font-size: 13px;
    flex-shrink: 0;
}

.notification-filters {
    display: flex;
    gap: 6px;
    padding: 14px 20px 10px;
}

.workspace .notification-filters button {
    flex: 1;
    padding: 8px 6px;
    border: 0;
    border-radius: 8px;
    background: #f3f6f4;
    color: #536c5e;
    font-size: 13px;
    min-height: 38px;
}

.notification-filters button[aria-pressed=true] {
    background: #e5f3eb;
    color: #205b43;
    font-weight: 700;
}

.notification-items {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 2px 12px 12px;
}

.workspace .notification-item {
    display: block;
    position: relative;
    width: 100%;
    text-align: left;
    background: #f3f9f5;
    border: 1px solid #e0ece4;
    border-radius: 10px;
    padding: 15px;
    margin: 8px 0;
    color: #203b30;
    white-space: normal;
    line-height: 1.6;
}

.notification-item.is-read {
    background: #fff;
    color: #63796c;
}

.notification-item:hover {
    border-color: #78a68b;
    background: #edf7f0;
}

.notification-item strong {
    display: block;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.notification-item .notification-amount {
    font-size: 18px;
    font-weight: 700;
    display: block;
    margin: 3px 0 8px;
    font-variant-numeric: tabular-nums;
}

.notification-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #6f8377;
}

.notification-state {
    display: inline-block;
    font-size: 11px;
    background: #e8efeb;
    padding: 2px 6px;
    border-radius: 5px;
    margin-right: 6px;
}

.notification-read-label {
    font-size: 11px;
    color: #577c64;
}

.notification-empty {
    text-align: center;
    padding: 48px 16px;
    font-size: 14px;
    color: #6f8377;
    white-space: normal;
}

.notification-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid #e4ece6;
    font-size: 12px;
}

.workspace .notification-pagination button, .workspace .notification-error button {
    padding: 6px 12px;
    min-height: 34px;
    border: 1px solid #dbe5de;
    border-radius: 7px;
    color: #355a44;
    background: white;
    font-size: 12px;
}

.notification-error {
    margin: 8px 20px;
    padding: 10px;
    background: #fff3ed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    white-space: normal;
}

.notification-toasts {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: min(360px, calc(100vw - 32px));
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.notification-toast {
    display: flex;
    position: relative;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #caddd0;
    border-radius: 12px;
    box-shadow: 0 8px 32px #173e2929;
    pointer-events: auto;
    animation: notification-rise .25s ease-out;
    overflow: hidden;
}

.workspace .notification-toast-open {
    border: 0;
    background: none;
    color: #203b30;
    text-align: left;
    flex: 1;
    min-width: 0;
    padding: 16px;
    white-space: normal;
    line-height: 1.6;
    font-size: 13px;
}

.notification-toast-open strong {
    display: block;
    color: #205b43;
    font-size: 14px;
    margin-bottom: 4px;
}

.notification-toast-open span {
    display: block;
    overflow-wrap: anywhere;
}

.notification-toast-open small {
    display: block;
    color: #6d8274;
    margin-top: 6px;
}

.workspace .notification-toast-dismiss {
    flex: none;
    padding: 8px;
    margin: 8px 8px 0 0;
    border: 0;
    background: none;
    color: #6d8274;
    font-size: 18px;
    width: 30px;
    height: 30px;
}

.notification-toast::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #77a88b;
    transform-origin: left;
    animation: notification-lifetime 5s linear forwards;
}

@keyframes notification-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes notification-lifetime {
    to {
        transform: scaleX(0);
    }
}

@media (max-width: 600px) {
    .notification-panel {
        inset: 12px;
        width: calc(100vw - 24px);
        height: calc(100dvh - 24px);
    }

    .notification-toasts {
        right: 16px;
        bottom: max(16px, env(safe-area-inset-bottom));
    }

    .notification-heading {
        padding: 18px 16px 14px;
    }

    .notification-filters {
        padding-inline: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .notification-toast, .notification-toast::after {
        animation: none;
    }
}

@media (max-width: 760px) {
    .workspace .notification-bell {
        width: 40px;
        height: 40px;
    }
}
