/**
 * Dashboard Styles
 * Modular CSS for dashboard interface
 */

/* Stat Cards */
.stat-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

/* Navigation */
.list-group-item {
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.list-group-item:hover {
    background-color: var(--bs-light);
    border-left-color: var(--bs-primary);
}

.list-group-item.active {
    background-color: var(--bs-primary);
    border-left-color: var(--bs-primary);
}

/* Dashboard Sections */
.dashboard-section {
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scanner Cards */
.scanner-card {
    border-radius: 8px;
    border-left: 4px solid var(--bs-secondary);
    transition: all 0.2s;
}

.scanner-card.online {
    border-left-color: var(--bs-success);
}

.scanner-card.offline {
    border-left-color: var(--bs-danger);
}

.scanner-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* User Table */
.user-table {
    background: white;
    border-radius: 8px;
}

.user-table th {
    background-color: var(--bs-light);
    border-bottom: 2px solid var(--bs-primary);
    font-weight: 600;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Role-based visibility */
.role-user:not(.show-role-user) { display: none !important; }
.role-admin:not(.show-role-admin) { display: none !important; }
.role-super_admin:not(.show-role-super_admin) { display: none !important; }

/* Activity Timeline */
.activity-item {
    padding: 0.75rem;
    border-left: 2px solid var(--bs-light);
    margin-left: 1rem;
    position: relative;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 1rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bs-primary);
}

.activity-item:hover {
    background-color: var(--bs-light);
}

/* Responsive */
@media (max-width: 768px) {
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .stat-card h3 {
        font-size: 1.5rem;
    }
}

/* Alert History Cards */
.hover-shadow {
    transition: all 0.2s ease-in-out;
}

.hover-shadow:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    transform: translateX(2px);
}

.card-body.py-2 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

/* Pulse Warning Animation for Out-of-Range Values */
@keyframes pulseWarning {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.8;
    }
}

.pulse-warning {
    animation: pulseWarning 1.5s ease-in-out infinite;
    display: inline-block;
}

