.notification-bell-wrapper {
    position: relative;
    cursor: pointer;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: #dc2626;
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    border-radius: 10px;
    padding: 2px 6px;
    line-height: 1;
    min-width: 18px;
    text-align: center;
    border: 2px solid #ffffff;
    display: none; /* hidden by default if 0 */
}

.notification-dropdown {
    width: 380px;
    padding: 0;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    margin-top: 15px !important;
    overflow: hidden;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    background-color: #ffffff;
}

.notification-header h6 {
    margin: 0;
    font-weight: 700;
    font-size: 1.1rem;
    color: #111827;
}

.mark-all-read {
    font-size: 0.85rem;
    color: var(--primary);
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
}

.mark-all-read:hover {
    text-decoration: underline;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
    background-color: #ffffff;
}

/* Custom scrollbar */
.notification-list::-webkit-scrollbar {
    width: 6px;
}
.notification-list::-webkit-scrollbar-track {
    background: transparent;
}
.notification-list::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.3);
    border-radius: 10px;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s;
    position: relative;
}

.notification-item:hover {
    background-color: #f9fafb;
}

.notification-item.unread {
    background-color: #f0faf6;
}
.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary);
}

.notif-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.notif-content {
    flex-grow: 1;
    min-width: 0;
}

.notif-title {
    font-weight: 600;
    color: #111827;
    font-size: 0.95rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-body {
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-time {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
}

.notification-item.read .notif-title {
    font-weight: 500;
}

.notification-item.read .notif-time {
    color: #9ca3af;
    font-weight: 500;
}

.notification-footer {
    display: block;
    text-align: center;
    padding: 14px;
    background-color: #f9fafb;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border-top: 1px solid #f3f4f6;
}

.notification-footer:hover {
    background-color: #f3f4f6;
    color: var(--primary);
}

.notif-empty {
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
}

.notif-empty i {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 15px;
}

/* Page specific styles */
.notif-page-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    padding: 24px;
    margin-bottom: 24px;
}

.notif-page-item {
    display: flex;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #f3f4f6;
    margin-bottom: 16px;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
    text-decoration: none;
    background-color: #ffffff;
}

.notif-page-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    border-color: #e5e7eb;
}

.notif-page-item.unread {
    background-color: #f0faf6;
    border-color: #d1f4ec;
}

.notif-page-content {
    flex-grow: 1;
    padding-right: 20px;
}

.notif-delete-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #9ca3af;
    background: none;
    border: none;
    font-size: 1.1rem;
    transition: color 0.2s;
    opacity: 0;
    z-index: 10;
}

.notif-page-item:hover .notif-delete-btn {
    opacity: 1;
}

.notif-delete-btn:hover {
    color: #dc2626;
}

.notif-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 10px;
}

.pill-high { background-color: #dcfce7; color: #16a34a; }
.pill-critical { background-color: #fee2e2; color: #dc2626; }
.pill-normal { background-color: #f3f4f6; color: #4b5563; }
.pill-low { background-color: #eff6ff; color: #2563eb; }

/* Realtime Toast Notification */
#notif-toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.notif-toast {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    width: 320px;
    padding: 16px;
    display: flex;
    gap: 12px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 4px solid var(--primary);
    position: relative;
}

.notif-toast.show {
    transform: translateX(0);
}

.notif-toast-close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #9ca3af;
    cursor: pointer;
    font-size: 0.9rem;
}

.notif-toast-close:hover {
    color: #4b5563;
}
