<?php $__env->startSection('title', 'ড্যাশবোর্ড | DMS'); ?>

<?php $__env->startSection('content'); ?>
<div class="content-wrapper">
    <div class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <h1 class="m-0 font-weight-bold text-dark"><i class="fas fa-tachometer-alt"></i> ড্যাশবোর্ড ওভারভিউ</h1>
                </div>
            </div>
        </div>
    </div>

    <section class="content">
        <div class="container-fluid">
            
            <div class="row">
                <div class="col-lg-3 col-6">
                    <div class="small-box bg-info shadow-sm">
                        <div class="inner">
                            <h3><?php echo e($total_companies ?? '02'); ?></h3>
                            <p>মোট কোম্পানি</p>
                        </div>
                        <div class="icon">
                            <i class="fas fa-building"></i>
                        </div>
                        <a href="<?php echo e(route('documents.index')); ?>" class="small-box-footer">বিস্তারিত <i class="fas fa-arrow-circle-right"></i></a>
                    </div>
                </div>
                
                <div class="col-lg-3 col-6">
                    <div class="small-box bg-success shadow-sm">
                        <div class="inner">
                            <h3><?php echo e($total_documents ?? '15'); ?></h3>
                            <p>মোট ডকুমেন্ট</p>
                        </div>
                        <div class="icon">
                            <i class="fas fa-file-alt"></i>
                        </div>
                        <a href="#" class="small-box-footer">বিস্তারিত <i class="fas fa-arrow-circle-right"></i></a>
                    </div>
                </div>

                <div class="col-lg-3 col-6">
                    <div class="small-box bg-warning shadow-sm">
                        <div class="inner">
                            <h3 class="text-dark"><?php echo e($expiring_soon ?? '0'); ?></h3>
                            <p>মেয়াদ শেষ হবে দ্রুত</p>
                        </div>
                        <div class="icon">
                            <i class="fas fa-hourglass-half"></i>
                        </div>
                        <a href="#" class="small-box-footer">বিস্তারিত <i class="fas fa-arrow-circle-right"></i></a>
                    </div>
                </div>

                <div class="col-lg-3 col-6">
                    <div class="small-box bg-danger shadow-sm">
                        <div class="inner">
                            <h3><?php echo e($expired_docs ?? '0'); ?></h3>
                            <p>মেয়াদ উত্তীর্ণ ফাইল</p>
                        </div>
                        <div class="icon">
                            <i class="fas fa-times-circle"></i>
                        </div>
                        <a href="#" class="small-box-footer">বিস্তারিত <i class="fas fa-arrow-circle-right"></i></a>
                    </div>
                </div>
            </div>

            <div class="row mt-4">
                <div class="col-md-8">
                    <div class="card shadow-sm border-0" style="border-radius: 12px;">
                        <div class="card-header bg-white d-flex justify-content-between align-items-center">
                            <h3 class="card-title font-weight-bold"><i class="fas fa-folder text-warning"></i> প্রতিষ্ঠানের ফোল্ডারসমূহ</h3>
                            <button class="btn btn-xs btn-primary" data-toggle="modal" data-target="#addCompanyModal">
                                <i class="fas fa-plus"></i> নতুন
                            </button>
                        </div>
                        <div class="card-body">
                            <div class="row">
                                <?php $__empty_1 = true; $__currentLoopData = $companies; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $company): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                <div class="col-md-4 mb-3">
                                    <div class="card h-100 border text-center folder-item shadow-none" style="border-radius: 10px; transition: 0.3s;">
                                        <div class="card-body py-4">
                                            <i class="fas fa-folder fa-4x text-warning mb-2"></i>
                                            <h6 class="font-weight-bold text-truncate"><?php echo e($company->name); ?></h6>
                                            <p class="small text-muted mb-3"><?php echo e($company->documents_count ?? 0); ?> টি ফাইল</p>
                                            <a href="<?php echo e(route('documents.company-folders', $company->id)); ?>" class="btn btn-sm btn-outline-primary btn-block rounded-pill">ওপেন</a>
                                        </div>
                                    </div>
                                </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                <div class="col-12 text-center py-5">
                                    <p class="text-muted">কোন কোম্পানি পাওয়া যায়নি।</p>
                                </div>
                                <?php endif; ?>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="col-md-4">
                    <div class="card shadow-sm border-0" style="border-radius: 12px;">
                        <div class="card-header bg-white">
                            <h3 class="card-title font-weight-bold text-danger"><i class="fas fa-history"></i> সাম্প্রতিক আপলোড</h3>
                        </div>
                        <div class="card-body p-0">
                            <table class="table table-valign-middle mb-0">
                                <thead>
                                    <tr>
                                        <th>ফাইল</th>
                                        <th>তারিখ</th>
                                        <th></th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php $__currentLoopData = $recent_docs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $doc): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                        <td>
                                            <span class="text-dark font-weight-600"><?php echo e(Str::limit($doc->title, 20)); ?></span>
                                        </td>
                                        <td><small><?php echo e($doc->created_at->format('d M')); ?></small></td>
                                        <td class="text-right">
                                            <a href="<?php echo e(asset('storage/' . $doc->file_path)); ?>" target="_blank" class="text-muted">
                                                <i class="fas fa-eye"></i>
                                            </a>
                                        </td>
                                    </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </tbody>
                            </table>
                        </div>
                        <div class="card-footer text-center bg-white">
                            <a href="#" class="small text-primary font-weight-bold">সব ফাইল দেখুন</a>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </section>
</div>

<style>
    .folder-item:hover {
        border-color: #3b82f6 !important;
        background-color: #f8fafc;
        transform: translateY(-5px);
        box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
    }
    .small-box { border-radius: 12px !important; }
    .small-box .icon { color: rgba(0,0,0,0.15) !important; }
    .card-header { border-bottom: 1px solid #f0f0f0; }
    body { font-family: 'Tiro Bangla', 'Source Sans Pro', sans-serif; }
</style>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/naowarin/mydoc.naowarinternational.my.id/resources/views/dashboard.blade.php ENDPATH**/ ?>