.notify-center {
    position: relative;
    z-index: 850;
}

.notify-center.notify-mount-fixed {
    position: fixed;
    left: 24px;
    bottom: 32px;
    right: auto;
}

.notify-center.notify-mount-fixed .notify-center-panel {
    left: 24px;
    right: auto;
}

.notify-center-btn {
    position: relative;
    width: 58px;
    height: 58px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(145deg, #6C5CE0, #5646c9);
    box-shadow: 0 14px 36px -10px rgba(108, 92, 224, 0.55);
}

.notify-center-btn svg {
    width: 26px;
    height: 26px;
    position: relative;
    z-index: 2;
}

.notify-center-waves {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
}

.notify-center-waves .wave {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(108, 92, 224, 0.45);
    opacity: 0;
}

.notify-center.has-unread .notify-center-waves .wave {
    animation: notifyWave 2.4s ease-out infinite;
}

.notify-center.has-unread .notify-center-waves .wave:nth-child(2) {
    animation-delay: 0.8s;
}

@keyframes notifyWave {
    0% { transform: scale(1); opacity: 0.65; }
    100% { transform: scale(2.2); opacity: 0; }
}

.notify-center-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    z-index: 3;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 100px;
    background: #E85D75;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
}

.notify-center-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 18, 31, 0.35);
    backdrop-filter: blur(3px);
    z-index: 860;
}

.notify-center-backdrop[hidden],
.notify-center-panel[hidden] {
    display: none !important;
}

.notify-center-panel {
    position: fixed;
    right: 24px;
    bottom: 96px;
    z-index: 870;
    width: min(400px, calc(100vw - 32px));
    max-height: min(70vh, 520px);
    background: #fff;
    border: 1px solid rgba(20, 18, 31, 0.1);
    border-radius: 18px;
    box-shadow: 0 24px 60px -24px rgba(20, 18, 31, 0.35);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notify-center-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(20, 18, 31, 0.08);
    background: linear-gradient(135deg, rgba(108, 92, 224, 0.07), rgba(43, 212, 166, 0.06));
}

.notify-center-head strong {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
}

.notify-center-sub {
    display: block;
    font-size: 0.82rem;
    color: rgba(20, 18, 31, 0.55);
    margin-top: 2px;
}

.notify-center-mark {
    border: none;
    background: transparent;
    color: #6C5CE0;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.notify-center-list {
    overflow-y: auto;
    padding: 10px;
}

.notify-center-empty {
    padding: 28px 16px;
    text-align: center;
    color: rgba(20, 18, 31, 0.55);
    font-size: 0.9rem;
}

.notify-center-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
    margin-bottom: 8px;
}

.notify-center-item:last-child {
    margin-bottom: 0;
}

.notify-center-item:hover {
    background: rgba(108, 92, 224, 0.06);
}

.notify-center-item.unread {
    background: rgba(108, 92, 224, 0.08);
    border-color: rgba(108, 92, 224, 0.14);
}

.notify-center-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(108, 92, 224, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.notify-center-item-copy strong {
    display: block;
    font-size: 0.92rem;
    margin-bottom: 2px;
}

.notify-center-item-copy span {
    display: block;
    font-size: 0.84rem;
    color: rgba(20, 18, 31, 0.62);
    line-height: 1.4;
}

.notify-center-item-copy time {
    display: block;
    margin-top: 6px;
    font-size: 0.74rem;
    color: rgba(20, 18, 31, 0.45);
}

/* Admin dark theme */
.notify-theme-dark .notify-center-btn {
    background: linear-gradient(145deg, #6366f1, #818cf8);
}

.notify-theme-dark .notify-center-panel {
    background: #151b2e;
    border-color: rgba(255, 255, 255, 0.08);
    color: #f4f6fb;
}

.notify-theme-dark .notify-center-head {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.notify-theme-dark .notify-center-sub,
.notify-theme-dark .notify-center-item-copy span,
.notify-theme-dark .notify-center-item-copy time,
.notify-theme-dark .notify-center-empty {
    color: rgba(244, 246, 251, 0.58);
}

.notify-theme-dark .notify-center-item:hover {
    background: rgba(129, 140, 248, 0.12);
}

.notify-theme-dark .notify-center-item.unread {
    background: rgba(129, 140, 248, 0.16);
    border-color: rgba(129, 140, 248, 0.22);
}

.notify-theme-dark .notify-center-mark {
    color: #c7d2fe;
}

/* Top-nav Messages shortcut — matches notification bell */
.nav-messages-mount {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 850;
}

.nav-messages-mount[hidden] {
    display: none !important;
}

.nav-messages-btn {
    position: relative;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(145deg, #6C5CE0, #5646c9);
    box-shadow: 0 10px 28px -10px rgba(108, 92, 224, 0.55);
    flex-shrink: 0;
}

.nav-messages-btn:hover {
    filter: brightness(1.06);
}

.nav-messages-btn svg {
    width: 20px;
    height: 20px;
    display: block;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.nav-messages-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    z-index: 3;
    box-sizing: border-box;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 100px;
    background: #E85D75;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    display: block;
}

.nav-messages-badge[hidden] {
    display: none !important;
}

/* Nav inline (parent profile) */
.notify-center.notify-mount-nav {
    position: relative;
}

.notify-center.notify-mount-nav .notify-center-btn {
    width: 44px;
    height: 44px;
}

.notify-center.notify-mount-nav .notify-center-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    bottom: auto;
}

.notify-center.notify-mount-nav .notify-center-backdrop {
    display: none !important;
}

/* Admin header inline */
.notify-center.notify-mount-admin .notify-center-btn {
    width: 44px;
    height: 44px;
}

.notify-center.notify-mount-admin .notify-center-panel {
    position: fixed;
    right: 28px;
    top: 88px;
    bottom: auto;
}

@media (max-width: 767px) {
    .notify-center.notify-mount-fixed {
        right: 16px;
        bottom: 20px;
    }

    .notify-center-panel {
        right: 16px;
        left: 16px;
        width: auto;
        bottom: 84px;
    }
}
