/* Bulk Operations Toolbar */
.bulk-toolbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.bulk-toolbar.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
}

.bulk-toolbar-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.selection-count {
    color: white;
    font-weight: 600;
    font-size: 14px;
    padding-right: 20px;
    border-right: 2px solid rgba(255,255,255,0.3);
}

.bulk-actions {
    display: flex;
    gap: 10px;
}

.bulk-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bulk-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.bulk-btn.danger {
    background: rgba(239, 68, 68, 0.8);
    border-color: rgba(239, 68, 68, 1);
}

.bulk-btn.danger:hover {
    background: rgba(239, 68, 68, 1);
}

.bulk-btn.secondary {
    background: rgba(0,0,0,0.2);
    border-color: rgba(255,255,255,0.2);
}

.bulk-btn .icon {
    font-size: 16px;
}

/* Progress Indicator */
.bulk-progress {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    z-index: 1001;
    display: none;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 1002;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
    border-left: 4px solid #10b981;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.error {
    border-left-color: #ef4444;
    background: #fee2e2;
    color: #991b1b;
}

.notification.info {
    border-left-color: #3b82f6;
    background: #dbeafe;
    color: #1e40af;
}

.notification.success {
    border-left-color: #10b981;
    background: #d1fae5;
    color: #065f46;
}

/* Search Autocomplete */
.search-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    margin-top: -1px;
}

.search-autocomplete.hidden {
    display: none;
}

.autocomplete-title {
    padding: 10px 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background: #f3f4f6;
}

.autocomplete-item .icon {
    opacity: 0.5;
}

.autocomplete-item .query {
    flex: 1;
}

.autocomplete-item mark {
    background: #fef3c7;
    color: #92400e;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Search Options */
.search-options {
    display: flex;
    gap: 15px;
    padding: 10px 0;
    flex-wrap: wrap;
}

.search-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #4b5563;
}

.search-option input[type="checkbox"],
.search-option input[type="radio"] {
    cursor: pointer;
}

.search-option:hover {
    color: #667eea;
}

/* Activity Feed */
.activity-feed {
    position: fixed;
    right: 0;
    top: 60px;
    width: 350px;
    height: calc(100vh - 60px);
    background: white;
    border-left: 1px solid #e5e7eb;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 50;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.activity-feed.open {
    transform: translateX(0);
}

.activity-feed-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.activity-feed-header h3 {
    margin: 0;
    font-size: 18px;
}

.activity-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s;
}

.activity-item:hover {
    background: #f9fafb;
}

.activity-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.activity-user {
    font-weight: 600;
    color: #667eea;
}

.activity-time {
    font-size: 11px;
    color: #9ca3af;
}

.activity-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: #f3f4f6;
    color: #4b5563;
    margin-bottom: 8px;
}

.activity-details {
    font-size: 13px;
    color: #6b7280;
}

/* Activity Toggle Button */
.activity-toggle {
    position: fixed;
    right: 20px;
    top: 70px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 49;
    transition: all 0.2s;
}

.activity-toggle:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

.activity-toggle .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-toggle .badge.hidden {
    display: none;
}

/* Monitoring Link */
.nav-link-monitoring {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link-monitoring:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateX(3px);
}

/* Keyboard Shortcuts Help */
.shortcuts-help {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0,0,0,0.85);
    color: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 300px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.shortcuts-help.visible {
    opacity: 1;
    pointer-events: all;
}

.shortcuts-help h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
}

.shortcut-key {
    background: rgba(255,255,255,0.2);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .bulk-toolbar {
        bottom: 10px;
        left: 10px;
        right: 10px;
        transform: none;
    }
    
    .bulk-toolbar-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .selection-count {
        border-right: none;
        border-bottom: 2px solid rgba(255,255,255,0.3);
        padding: 0 0 10px 0;
    }
    
    .activity-feed {
        width: 100%;
    }
}
