<?= $this->extend('layout/main') ?>

<?= $this->section('content') ?>
<div class="row">
    <div class="col-lg-4 col-6">
        <div class="small-box bg-emerald shadow">
            <div class="inner">
                <h3><?= $total_petani ?></h3>
                <p>Petani Terdaftar</p>
            </div>
            <div class="icon">
                <i class="fas fa-users"></i>
            </div>
            <a href="<?= base_url('petani') ?>" class="small-box-footer">Detail Petani <i class="fas fa-arrow-circle-right"></i></a>
        </div>
    </div>

    <div class="col-lg-4 col-6">
        <div class="small-box bg-emerald shadow">
            <div class="inner">
                <h3><?= number_format($total_stok, 0, ',', '.') ?> <sup style="font-size: 20px">Kg</sup></h3>
                <p>Total Stok Gudang</p>
            </div>
            <div class="icon">
                <i class="fas fa-warehouse"></i>
            </div>
            <a href="<?= base_url('pupuk') ?>" class="small-box-footer">Cek Stok <i class="fas fa-arrow-circle-right"></i></a>
        </div>
    </div>

    <div class="col-lg-4 col-12">
        <div class="small-box bg-emerald shadow">
            <div class="inner">
                <h3>Rp <?= number_format($saldo_kas, 0, ',', '.') ?></h3>
                <p>Saldo Kas Kelompok</p>
            </div>
            <div class="icon">
                <i class="fas fa-wallet"></i>
            </div>
            <a href="<?= base_url('keuangan') ?>" class="small-box-footer">Lihat Laporan <i class="fas fa-arrow-circle-right"></i></a>
        </div>
    </div>
</div>

<div class="row">
    <div class="col-md-8">
        <div class="card card-emerald card-outline">
            <div class="card-header">
                <h3 class="card-title text-bold"><i class="fas fa-bullhorn mr-1"></i> Informasi Sistem</h3>
            </div>
            <div class="card-body">
                <h5>Selamat Datang di SIM SARI RASA</h5>
                <p>Sistem ini dirancang untuk memantau penyaluran pupuk bersubsidi agar tepat sasaran sesuai dengan kuota <b>e-RDKK</b> yang telah ditetapkan.</p>
                <hr>
                <p class="text-muted italic small">Saran: Segera lakukan input data stok masuk jika kiriman dari distributor telah tiba.</p>
            </div>
        </div>
    </div>

    <div class="col-md-4">
        <div class="info-box bg-light border-left border-emerald shadow-sm">
            <span class="info-box-icon bg-emerald text-white"><i class="far fa-calendar-alt"></i></span>
            <div class="info-box-content">
                <span class="info-box-text text-bold">Tahun Anggaran</span>
                <span class="info-box-number"><?= date('Y') ?></span>
            </div>
        </div>
    </div>
</div>
<?= $this->endSection() ?>