/* Activities App Styles */

/* Base Styles */
.activities-container {
    background-color: #f8f9fa;
    min-height: 100vh;
    padding: 2rem 0;
}

/* Navigation Styles */
.activities-nav {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.activities-nav .navbar-brand {
    font-weight: bold;
    color: white !important;
}

.activities-nav .nav-link {
    color: rgba(255,255,255,0.8) !important;
    transition: all 0.3s ease;
    border-radius: 5px;
    margin: 0 0.25rem;
}

.activities-nav .nav-link:hover,
.activities-nav .nav-link.active {
    color: white !important;
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

/* Card Styles */
.activity-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
}

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.activity-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Activity List Styles */
.activity-list {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.activity-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s ease;
    position: relative;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.activity-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #007bff;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.activity-item:hover::before {
    transform: scaleY(1);
}

/* Activity Status Indicators */
.activity-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}

.status-success {
    background-color: #28a745;
}

.status-warning {
    background-color: #ffc107;
}

.status-danger {
    background-color: #dc3545;
}

.status-info {
    background-color: #17a2b8;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Action Buttons */
.activity-actions {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.activity-item:hover .activity-actions {
    opacity: 1;
}

.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Filter Panel */
.filter-panel {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.filter-panel .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.filter-panel .form-control,
.filter-panel .form-select {
    border-radius: 8px;
    border: 1px solid #ced4da;
    transition: all 0.3s ease;
}

.filter-panel .form-control:focus,
.filter-panel .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Statistics Cards */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
    position: relative;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.stats-card .card-body {
    position: relative;
    z-index: 1;
}

.stats-card h3 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stats-card .stats-icon {
    font-size: 3rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

/* Activity Icons */
.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    font-size: 1.2rem;
    color: white;
}

.icon-login {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.icon-logout {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.icon-register {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.icon-password {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
}

.icon-security {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.icon-admin {
    background: linear-gradient(135deg, #6f42c1 0%, #5a2d91 100%);
}

/* Pagination */
.pagination {
    margin-top: 2rem;
}

.page-link {
    border-radius: 8px;
    margin: 0 0.25rem;
    border: 1px solid #dee2e6;
    color: #007bff;
    transition: all 0.3s ease;
}

.page-link:hover {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    transform: translateY(-1px);
}

.page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Modal Styles */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    border-bottom: none;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-body {
    padding: 2rem;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,.3);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h4 {
    margin-bottom: 1rem;
    color: #495057;
}

/* Audit Log Specific Styles */
.audit-item {
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.audit-item.create {
    border-left-color: #28a745;
}

.audit-item.update {
    border-left-color: #ffc107;
}

.audit-item.delete {
    border-left-color: #dc3545;
}

.audit-changes {
    background: #f8f9fa;
    border-radius: 5px;
    padding: 0.75rem;
    margin-top: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.change-added {
    background-color: #d4edda;
    color: #155724;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    margin: 0.25rem;
    display: inline-block;
}

.change-removed {
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    margin: 0.25rem;
    display: inline-block;
    text-decoration: line-through;
}

/* Security Events Specific Styles */
.security-item {
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.severity-critical {
    border-left-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

.severity-high {
    border-left-color: #fd7e14;
    background-color: rgba(253, 126, 20, 0.05);
}

.severity-medium {
    border-left-color: #ffc107;
    background-color: rgba(255, 193, 7, 0.05);
}

.severity-low {
    border-left-color: #20c997;
    background-color: rgba(32, 201, 151, 0.05);
}

.severity-info {
    border-left-color: #0dcaf0;
    background-color: rgba(13, 202, 240, 0.05);
}

.threat-indicator {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 1rem;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

.resolution-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-open {
    background-color: #dc3545;
    color: white;
}

.status-investigating {
    background-color: #ffc107;
    color: #212529;
}

.status-resolved {
    background-color: #28a745;
    color: white;
}

.status-false-positive {
    background-color: #6c757d;
    color: white;
}

/* Analytics Specific Styles */
.analytics-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.analytics-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

.metric-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #007bff;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.chart-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.trend-indicator {
    font-size: 0.9rem;
    font-weight: 500;
}

.trend-up {
    color: #28a745;
}

.trend-down {
    color: #dc3545;
}

.trend-neutral {
    color: #6c757d;
}

/* Heatmap Styles */
.activity-heatmap {
    background: white;
    border-radius: 10px;
    padding: 1rem;
}

.heatmap-cell {
    width: 15px;
    height: 15px;
    border-radius: 2px;
    margin: 1px;
    display: inline-block;
    cursor: pointer;
    transition: all 0.2s ease;
}

.heatmap-cell:hover {
    transform: scale(1.2);
    border: 2px solid #007bff;
}

.heatmap-level-0 { background-color: #ebedf0; }
.heatmap-level-1 { background-color: #c6e48b; }
.heatmap-level-2 { background-color: #7bc96f; }
.heatmap-level-3 { background-color: #239a3b; }
.heatmap-level-4 { background-color: #196127; }

/* User Activity Styles */
.top-users-list {
    max-height: 400px;
    overflow-y: auto;
}

.user-activity-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.user-activity-item:hover {
    background-color: #f8f9fa;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 1rem;
}

/* Timeline Styles */
.timeline-item {
    border-left: 3px solid #007bff;
    padding-left: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #007bff;
}

/* Export Options */
.export-options {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .activity-item {
        padding: 0.75rem 1rem;
    }
    
    .activity-actions {
        opacity: 1;
        margin-top: 0.5rem;
    }
    
    .filter-panel {
        padding: 1rem;
    }
    
    .stats-card h3 {
        font-size: 2rem;
    }
    
    .chart-container {
        padding: 1rem;
    }
    
    .heatmap-cell {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 576px) {
    .activities-container {
        padding: 1rem 0;
    }
    
    .activity-item {
        padding: 0.5rem;
    }
    
    .filter-panel {
        padding: 0.75rem;
    }
    
    .stats-card h3 {
        font-size: 1.5rem;
    }
    
    .activity-icon {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .threat-indicator {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .activities-container {
        background-color: #1a1a1a;
        color: #e9ecef;
    }
    
    .activity-card,
    .filter-panel,
    .chart-container {
        background-color: #2d3748;
        color: #e9ecef;
    }
    
    .activity-item:hover {
        background-color: #4a5568;
    }
    
    .modal-content {
        background-color: #2d3748;
        color: #e9ecef;
    }
    
    .form-control,
    .form-select {
        background-color: #4a5568;
        border-color: #718096;
        color: #e9ecef;
    }
    
    .form-control:focus,
    .form-select:focus {
        background-color: #4a5568;
        border-color: #007bff;
        color: #e9ecef;
    }
}

/* Print Styles */
@media print {
    .activities-nav,
    .filter-panel,
    .activity-actions,
    .pagination {
        display: none !important;
    }
    
    .activity-card,
    .chart-container {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    .activity-item {
        break-inside: avoid;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.shadow-medium {
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.shadow-strong {
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%) 1;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}