/* =============================================
   UNIVERSAL NOTIFICATION PANEL
   Reusable across all pages with bell icon
   ============================================= */

/* Overlay */
.notif-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: none;
    justify-content: flex-end;
}
.notif-overlay.active {
    display: flex;
}

/* Panel — slides in from right */
.notif-panel {
    width: 100%;
    max-width: 420px;
    height: 100vh;
    height: 100dvh;
    background: #0a0e17;
    border-left: 1px solid #1a1f2e;
    display: flex;
    flex-direction: column;
    animation: notifSlideIn 0.3s ease;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
}
@keyframes notifSlideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Header */
.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid #1a1f2e;
    flex-shrink: 0;
}
.notif-header-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.notif-header-icon {
    width: 36px;
    height: 36px;
    background: rgba(212, 168, 83, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f0d078;
    font-size: 1.1rem;
}
.notif-header-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
}
.notif-header-count {
    font-size: 0.7rem;
    color: #7c8290;
    background: #111620;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
}
.notif-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #1a1f2e;
    background: transparent;
    color: #7c8290;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    font-size: 1.1rem;
}
.notif-close-btn:hover {
    color: #fff;
    border-color: #e63946;
}

/* Actions row */
.notif-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-bottom: 1px solid #111620;
    flex-shrink: 0;
}
.notif-action-btn {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    border: 1px solid #1a1f2e;
    background: transparent;
    color: #7c8290;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}
.notif-action-btn:hover {
    border-color: #d4a853;
    color: #f0d078;
}

/* List */
.notif-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
    -webkit-overflow-scrolling: touch;
}
.notif-list::-webkit-scrollbar {
    width: 4px;
}
.notif-list::-webkit-scrollbar-thumb {
    background: #1a1f2e;
    border-radius: 2px;
}

/* Individual notification item */
.notif-item {
    display: flex;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #111620;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
    position: relative;
}
.notif-item:hover {
    background: rgba(255, 255, 255, 0.015);
}
.notif-item.unread {
    background: rgba(212, 168, 83, 0.03);
}
.notif-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: #d4a853;
    border-radius: 0 3px 3px 0;
}
.notif-item-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    background: #111620;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.notif-item-body {
    flex: 1;
    min-width: 0;
}
.notif-item-title {
    font-weight: 600;
    font-size: 0.82rem;
    color: #e8e6e3;
    margin-bottom: 0.2rem;
    line-height: 1.3;
}
.notif-item.unread .notif-item-title {
    color: #fff;
}
.notif-item-message {
    font-size: 0.72rem;
    color: #7c8290;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.notif-item-time {
    font-size: 0.6rem;
    color: #5a606e;
    margin-top: 0.35rem;
}

/* Empty state */
.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #7c8290;
    text-align: center;
}
.notif-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}
.notif-empty-text {
    font-size: 0.85rem;
    font-weight: 500;
}
.notif-empty-sub {
    font-size: 0.7rem;
    margin-top: 0.3rem;
    opacity: 0.7;
}

/* Loading spinner */
.notif-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}
.notif-spinner {
    width: 28px;
    height: 28px;
    border: 2px solid #1a1f2e;
    border-top-color: #d4a853;
    border-radius: 50%;
    animation: notifSpin 0.7s linear infinite;
}
@keyframes notifSpin {
    to { transform: rotate(360deg); }
}

/* Bell badge pulse */
.notification-btn {
    position: relative;
}
.notif-bell-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    background: #e63946;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 800;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 0 0 3px #05080f;
    animation: notifBadgePulse 2s infinite;
    pointer-events: none;
}
@keyframes notifBadgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(230, 57, 70, 0); }
}

/* =============================================
   RESPONSIVE — MOBILE
   ============================================= */
@media (max-width: 480px) {
    .notif-panel {
        max-width: 100%;
        border-radius: 0;
        border-left: none;
    }
    .notif-header {
        padding: 1rem 1.2rem;
    }
    .notif-actions {
        padding: 0.7rem 1.2rem;
    }
    .notif-item {
        padding: 0.9rem 1.2rem;
    }
}