html.notif-scroll-locked,
body.notif-scroll-locked {
    overflow: hidden !important;
    overscroll-behavior: none !important;
}

#navNotifWrapper[hidden],
#notifBadge[hidden] {
    display: none !important;
}

.notif-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2150;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
}

.notif-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.notif-drawer {
    position: fixed;
    top: 70px;
    right: -400px;
    width: 380px;
    max-height: calc(100vh - 100px);
    z-index: 2200;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.notif-drawer-header,
.notif-drawer-list {
    pointer-events: auto;
}

.notif-drawer.active {
    right: 20px;
}

.notif-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 8px;
    border-bottom: none;
}

.notif-drawer-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.notif-drawer-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.notif-mark-read {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.68rem;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.notif-mark-read:hover {
    border-color: rgba(129, 140, 248, 0.28);
    background: rgba(99, 102, 241, 0.12);
    color: rgba(255, 255, 255, 0.92);
}

.notif-mark-read.is-disabled,
.notif-clear-all.is-disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.notif-clear-all {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    transition: background 0.2s, padding 0.2s;
}

.notif-clear-all:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notif-clear-all .icon-x {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    transition: opacity 0.15s;
}

.notif-clear-all .text-clear {
    position: absolute;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s;
}

.notif-clear-all:hover .icon-x {
    opacity: 0;
}

.notif-clear-all:hover .text-clear {
    opacity: 1;
}

.notif-drawer-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 12px;
    scrollbar-width: none;
}

.notif-drawer-list::-webkit-scrollbar {
    display: none;
}

.notif-filter-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.notif-filter-strip--status {
    margin-top: -2px;
}

.notif-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.66rem;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.notif-filter-chip:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.notif-filter-chip span {
    white-space: nowrap;
}

.notif-filter-chip strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    min-height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.62rem;
    line-height: 1;
}

.notif-filter-chip.is-active {
    border-color: rgba(129, 140, 248, 0.4);
    background: rgba(99, 102, 241, 0.18);
    color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.14);
}

.notif-filter-chip.is-active strong {
    background: rgba(255, 255, 255, 0.14);
}

.notif-card {
    position: relative;
    z-index: 1;
    background: rgba(30, 40, 55, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
    cursor: pointer;
    overflow: visible;
    transition: background 0.2s, transform 0.2s, z-index 0s;
}

.notif-card:hover {
    z-index: 100;
    isolation: isolate;
    background: rgba(40, 55, 75, 0.8);
    transform: translateY(-2px);
}

.notif-card.unread {
    background: rgba(60, 50, 90, 0.75);
    border-left: 3px solid #818cf8;
}

.notif-card.is-pinned {
    border-color: rgba(250, 204, 21, 0.2);
    box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.06);
}

.notif-card-close {
    position: absolute;
    top: -6px;
    left: -6px;
    z-index: 10;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.15s, background 0.15s, transform 0.15s;
    pointer-events: auto;
}

.notif-card:hover .notif-card-close {
    opacity: 1;
    transform: scale(1);
}

.notif-card-close:hover {
    background: #ef4444;
}

.notif-card-close i {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.8);
}

.notif-card-close:hover i {
    color: #fff;
}

.notif-card-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.notif-card-icon {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-card-icon.info {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}

.notif-card-icon.warning {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.notif-card-icon.success {
    background: rgba(52, 211, 153, 0.2);
    color: #34d399;
}

.notif-card-icon.alert {
    background: rgba(248, 113, 113, 0.2);
    color: #fca5a5;
}

.notif-card-icon i {
    font-size: 0.65rem;
}

.notif-card-info {
    flex: 1;
    min-width: 0;
}

.notif-card-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin-bottom: 2px;
}

.notif-card-title {
    flex: 1;
    min-width: 0;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-card-tag {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.6rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.notif-card-tag--assignment {
    border-color: rgba(96, 165, 250, 0.2);
    background: rgba(96, 165, 250, 0.16);
    color: #bfdbfe;
}

.notif-card-tag--security {
    border-color: rgba(248, 113, 113, 0.22);
    background: rgba(248, 113, 113, 0.16);
    color: #fecaca;
}

.notif-card-tag--announcement {
    border-color: rgba(250, 204, 21, 0.22);
    background: rgba(250, 204, 21, 0.14);
    color: #fde68a;
}

.notif-card-tag--admin-notice {
    border-color: rgba(192, 132, 252, 0.2);
    background: rgba(192, 132, 252, 0.16);
    color: #e9d5ff;
}

.notif-card-pin {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.46);
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.notif-card-pin:hover {
    border-color: rgba(250, 204, 21, 0.28);
    background: rgba(250, 204, 21, 0.12);
    color: #fde68a;
    transform: translateY(-1px);
}

.notif-card-pin.is-active {
    border-color: rgba(250, 204, 21, 0.34);
    background: rgba(250, 204, 21, 0.16);
    color: #fde68a;
}

.notif-card-pin i {
    font-size: 0.62rem;
}

.notif-card-body {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
}

.notif-card.expanded .notif-card-body {
    -webkit-line-clamp: unset;
}

.notif-card-time {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.35);
    white-space: nowrap;
    margin-left: auto;
    flex-shrink: 0;
}

.notif-expand-wrapper {
    text-align: center;
    padding: 8px 0;
}

.notif-expand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.notif-expand-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.notif-expand-btn span {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.5);
}

.notif-expand-btn i {
    font-size: 0.4rem;
    color: rgba(255, 255, 255, 0.35);
}

.notif-empty {
    padding: 30px 16px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    text-align: center;
}

.notif-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 1.5px solid rgba(30, 30, 40, 0.9);
    box-shadow: 0 0 5px #ef4444;
}

@keyframes notifSlideIn {
    0% {
        transform: translateY(-15px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes notifExit {
    0% {
        transform: translateX(0);
        opacity: 1;
        max-height: 150px;
        margin-bottom: 6px;
        padding-top: 10px;
        padding-bottom: 10px;
        border-width: 1px;
    }

    40% {
        transform: translateX(100%);
        opacity: 0;
        max-height: 150px;
        margin-bottom: 6px;
        padding-top: 10px;
        padding-bottom: 10px;
        border-width: 1px;
    }

    100% {
        transform: translateX(100%);
        opacity: 0;
        max-height: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
        border-width: 0;
    }
}

.notif-card.exit {
    transition: none !important;
    transform: none !important;
    animation: notifExit 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
    pointer-events: none;
    z-index: 0 !important;
}

@keyframes notifEnter {
    0% {
        opacity: 0;
        transform: translateY(20px);
        max-height: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
        border-width: 0;
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        max-height: 150px;
        margin-bottom: 6px;
        padding-top: 10px;
        padding-bottom: 10px;
        border-width: 1px;
    }
}

.notif-card.sliding-in {
    animation: notifEnter 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@media (max-width: 768px) {
    .notif-drawer {
        top: -100%;
        right: 0;
        width: 100%;
        max-height: 70vh;
        border-radius: 0 0 20px 20px;
        transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .notif-drawer.active {
        top: 0;
        right: 0;
    }

    .notif-drawer-header {
        position: relative;
        justify-content: center;
        margin-bottom: 8px;
        padding: 40px 20px 20px;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border-bottom: none;
    }

    .notif-drawer-title {
        font-size: 1.3rem;
        text-align: center;
    }

    .notif-drawer-actions {
        position: absolute;
        top: 18px;
        right: 20px;
    }

    .notif-clear-all {
        display: none;
    }

    .notif-drawer-list {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 50vh;
        padding: 12px 16px;
    }

    .notif-filter-strip {
        gap: 6px;
    }

    .notif-filter-chip {
        width: calc(50% - 3px);
        justify-content: space-between;
    }

    .notif-mark-read {
        min-height: 30px;
        padding: 0 12px;
        font-size: 0.72rem;
    }

    .notif-empty {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 40vh;
        font-size: 0.9rem;
    }

    .notif-card-title-row {
        flex-wrap: wrap;
    }
}
