.portal-notify-btn {
    position: relative;
}

.portal-notify-btn.is-highlighted {
    box-shadow: 0 0 0 1px rgba(255,255,255,0.18), 0 0 16px rgba(255,255,255,0.18);
}

.portal-notify-btn.is-highlighted i {
    animation: portalBellPulse 1.9s ease-in-out infinite;
}

.portal-notify-btn__dot,
.portal-notify-btn__count {
    position: absolute;
    pointer-events: none;
}

.portal-notify-btn__dot {
    top: 7px;
    right: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffcc00;
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.15);
    display: none;
}

.portal-notify-btn__count {
    top: -4px;
    right: -4px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ffffff;
    color: #111111;
    font-size: 11px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.portal-notify-btn.has-new .portal-notify-btn__dot,
.portal-notify-btn.has-new-count .portal-notify-btn__count {
    display: flex;
}

.portal-notifications {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(420px, calc(100vw - 24px));
    background: rgba(17, 23, 35, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 18px;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
    z-index: 9999;
    overflow: hidden;
}

.portal-notifications[hidden] {
    display: none !important;
}

.portal-notifications__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-notifications__header strong {
    display: block;
    font-size: 15px;
    color: #ffffff;
}

.portal-notifications__header p {
    margin: 4px 0 0;
    font-size: 12px;
    color: rgba(255,255,255,0.62);
}

.portal-notifications__mark-read {
    border: 0;
    background: rgba(255,255,255,0.08);
    color: #ffffff;
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.portal-notifications__mark-read:hover {
    background: rgba(255,255,255,0.14);
}

.portal-notifications__body {
    max-height: 420px;
    overflow: auto;
    padding: 10px;
}

.portal-notifications__empty {
    padding: 18px 14px;
    border-radius: 14px;
    color: rgba(255,255,255,0.68);
    background: rgba(255,255,255,0.04);
    font-size: 14px;
}

.portal-notification-item {
    display: block;
    text-decoration: none;
    color: inherit;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 14px;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.portal-notification-item + .portal-notification-item {
    margin-top: 10px;
}

.portal-notification-item:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.14);
}

.portal-notification-item__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.portal-notification-item__type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.86);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.portal-notification-item__date {
    font-size: 12px;
    color: rgba(255,255,255,0.52);
}

.portal-notification-item__title {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.35;
    color: #ffffff;
}

.portal-notification-item__message {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255,255,255,0.78);
}

.portal-notification-item.is-unread {
    border-color: rgba(255, 204, 0, 0.26);
    background: linear-gradient(180deg, rgba(255, 204, 0, 0.08), rgba(255,255,255,0.03));
}

@keyframes portalBellPulse {
    0%, 100% { transform: rotate(0deg) scale(1); }
    10% { transform: rotate(-10deg) scale(1.02); }
    20% { transform: rotate(10deg) scale(1.03); }
    30% { transform: rotate(-8deg) scale(1.02); }
    40% { transform: rotate(6deg) scale(1.01); }
    50% { transform: rotate(0deg) scale(1); }
}

.portal-notifications-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;

    width: 360px;
    min-height: 120px;

    background: #111827;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    padding: 12px;

    box-shadow: 0 20px 50px rgba(0,0,0,.45);
    z-index: 9999;

    display: none;
}

.portal-notifications-panel:not([hidden]) {
    display: block;
}
