<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <title>AsiaServ</title>
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <meta content="" name="keywords">
    <meta content="" name="description">

    

    <link href="<?= base_url(); ?>/assets/template/admin/libs/datatables.net-bs5/css/dataTables.bootstrap5.min.css" rel="stylesheet" type="text/css" />
    <link href="<?= base_url(); ?>/assets/template/admin/libs/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css" rel="stylesheet" type="text/css" />
    <link href="<?= base_url(); ?>/assets/template/admin/libs/datatables.net-buttons-bs5/css/buttons.bootstrap5.min.css" rel="stylesheet" type="text/css" />
    <link href="<?= base_url(); ?>/assets/template/admin/libs/datatables.net-select-bs5/css//select.bootstrap5.min.css" rel="stylesheet" type="text/css" />

    <!-- Favicon -->
    <link href="<?= base_url('assets/img/asiaserv-logo.png'); ?>" rel="icon">

    <!-- Google Web Fonts -->
    <link href="<?= base_url('assets/css/fontgoogle.css'); ?>" rel="stylesheet">
    
    
    <!-- Custom styles for this page -->
    <link href="<?= base_url('assets/vendor/datatables/dataTables.bootstrap4.min.css'); ?>" rel="stylesheet">
    
    
    <!-- Icon Font Stylesheet -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.4.1/font/bootstrap-icons.css" rel="stylesheet">

    <!-- Icon Font Stylesheet -->
    <link href="<?= base_url('assets/css/all.min.css'); ?>" rel="stylesheet">
    <link href="<?= base_url('assets/css/bootstrap-icons.css'); ?>" rel="stylesheet">

    <link href="<?= base_url('assets/dataTables/datatables.min.css'); ?>" rel="stylesheet">
    <link href="<?= base_url('assets/dataTables/datatables.css'); ?>" rel="stylesheet">

    <!-- Libraries Stylesheet -->
    <link href="<?= base_url('assets/lib/owlcarousel/assets/owl.carousel.min.css'); ?>" rel="stylesheet">
    <link href="<?= base_url('assets/lib/tempusdominus/css/tempusdominus-bootstrap-4.min.css'); ?>" rel="stylesheet">

    <!-- Customized Bootstrap Stylesheet -->
    <link href="<?= base_url('assets/css/bootstrap.min.css'); ?>" rel="stylesheet">

    <!-- Template Stylesheet -->
    <link href="<?= base_url('assets/css/style.css'); ?>" rel="stylesheet">

    <link href="<?= base_url('assets/template/admin/css/icons.min.css'); ?>" rel="stylesheet">

    <!-- Sweet Alert -->
    <link href="<?= base_url('assets/css/sweetalert2.min.css'); ?>" rel="stylesheet">
    <!-- <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css'> -->
    
    
</head>

<style>
.sidebar {
    width: 250px;
    height: 100vh;
}
.navbar-nav .nav-link {
    color: #ddd;
    padding: 10px 20px;
}
.navbar-nav .dropdown-menu {
    padding-left: 20px;
}
.navbar-nav .dropdown-item {
    /* color: #ccc; */
    padding-left: 10px;
}
.navbar-nav .dropdown-item i {
    font-size: 0.8em;
}


/* Style untuk dropdown-menu */
.dropdown-menu {
    background-color: #f8f9fa; /* Warna latar belakang dropdown */
    border: 1px solid #e9ecef; /* Border dropdown */
    border-radius: 0.25rem; /* Membuat sudut agak membulat */
}

/* Style untuk dropdown-item */
.dropdown-item {
    padding: 0.5rem 1rem;
    color: #212529; /* Warna teks default */
    transition: background-color 0.3s ease, color 0.3s ease; /* Transisi saat hover */
}

/* Hover efek */
.dropdown-item:hover {
    background-color: #007bff; /* Warna biru saat hover */
    color: #fff; /* Teks putih */
}

/* Aktif efek */
.dropdown-item:active {
    background-color: #0056b3; /* Biru lebih gelap */
    color: #fff;
}





    </style>

<body>
    <div class="container-fluid position-relative bg-white d-flex p-0">

        <!-- Sidebar Start -->
        <div class="sidebar pe-4 pb-3">
            <nav class="navbar bg-light navbar-light">
                <a href="index.html" class="navbar-brand mx-4 mb-3">
                    <img src="<?= base_url('/assets/img/asiaserv-logo.png');?>" style="width:200px; height:100px" />
                </a>
            
                <!-- <div class="d-flex align-items-center ms-4 mb-4">
                    <div class="position-relative">
                        <img class="rounded-circle" src="<?php 
                                if ($this->session->userdata('user_profile') != null) {
                                    echo base_url('/assets/image/profile/'.$this->session->userdata('user_profile'));
                                } else {
                                    echo base_url('/assets/template/admin/images/app/avatar_default.svg');
                                }
                            ?>" alt="" style="width: 40px; height: 40px;">
                        <div class="bg-success rounded-circle border border-2 border-white position-absolute end-0 bottom-0 p-1"></div>
                    </div>
                    <div class="ms-3">
                        <h6 class="mb-0"><?php echo $this->session->userdata('user_nama'); ?></h6>
                        <span><?php echo $this->session->userdata('user_role'); ?></span>
                    </div>
                </div> -->


                <!-- Sidebar -->
                <div class="navbar-nav w-100">
                    <!-- Dashboard -->
                    <a href="<?php echo site_url('Admin/Admin_Dashboard_Controller') ?>" class="nav-item nav-link d-flex align-items-center <?php echo $this->uri->segment(1) == 'Discuss' ? 'active' : ''; ?>">
                        <i class="fa fa-home me-2"></i> <span>Dashboard</span>
                    </a>
                    
                    <!-- Master User -->
                    <a href="<?php echo site_url('Admin/Akun/MasterUser') ?>" class="nav-item nav-link d-flex align-items-center <?php echo $this->uri->segment(1) == 'Admin/Akun/MasterUser' ? 'active' : ''; ?>">
                        <i class="bi bi-person-lines-fill me-2"></i> <span>Master User</span>
                    </a>


                    
                    <!-- Location, Types & Inventory Dropdown -->
                    <div class="nav-item dropdown">
                        <a href="#" class="nav-link dropdown-toggle d-flex align-items-center" data-bs-toggle="dropdown">
                        <i class="bi bi-inboxes-fill me-2"></i> <span>Inventory</span>
                        </a>
                        <div class="dropdown-menu bg-light border-0 rounded-0 m-0">
                            <a href="<?php echo site_url('Admin/Inventory/Inventory_Location_Controller') ?>" class="dropdown-item">
                                <i class="bi bi-geo-alt-fill me-2"></i> Master Location
                            </a>
                            <a href="<?php echo site_url('Admin/Inventory/Inventory_Types_Controller') ?>" class="dropdown-item">
                                <i class="bi bi-archive-fill me-2"></i> Master Types
                            </a>
                            <!-- <a href="<?php echo site_url('Admin/Inventory/Inventory_Controller') ?>" class="dropdown-item">
                                <i class="bi bi-tools me-2"></i> Master Inventory
                            </a> -->
                        </div>
                    </div>


                    <div class="nav-item dropdown">
                        <a href="#" class="nav-link dropdown-toggle d-flex align-items-center" data-bs-toggle="dropdown">
                        <i class="bi bi-gear-fill me-2"></i> <span>Option</span>
                        </a>
                        <div class="dropdown-menu bg-light border-0 rounded-0 m-0">
                            <a href="<?php echo site_url('Admin/Option/Brand_Categories_Controller') ?>" class="dropdown-item">
                                <i class="bi bi-tags-fill me-2"></i> Master Brand
                            </a>
                            <a href="<?php echo site_url('Admin/Option/Uom_Categories_Controller') ?>" class="dropdown-item">
                                <i class="bi bi-rulers me-2"></i> Master UoM
                            </a>
                            <a href="<?php echo site_url('Admin/Option/Divisi_Categories_Controller') ?>" class="dropdown-item">
                                <i class="bi bi-diagram-3-fill me-2"></i> Master Divisi
                            </a>
                        </div>
                    </div>

                    <div class="nav-item dropdown">
                        <a href="#" class="nav-link dropdown-toggle d-flex align-items-center" data-bs-toggle="dropdown">
                        <i class="bi bi-stickies-fill me-2"></i> <span>Master ATK</span>
                        </a>
                        <div class="dropdown-menu bg-light border-0 rounded-0 m-0">
                            <a href="<?php echo site_url('Admin/ATK/Atk_Categories_Controller') ?>" class="dropdown-item">
                                <i class="bi bi-list-check me-2"></i> Category Master ATK
                            </a>
                            <a href="<?php echo site_url('Admin/ATK/Atk_Product_Controller') ?>" class="dropdown-item">
                                <i class="bi bi-ui-checks me-2"></i>  Product Master ATK
                            </a>
                            <a href="<?php echo site_url('Admin/ATK/Atk_Pengambilan_Controller') ?>" class="dropdown-item">
                                <i class="bi bi-clipboard-data me-2"></i> Retrieval Data
                            </a>
                        </div>
                    </div>
                </div>


            </nav>
        </div>
        <!-- Sidebar End -->


        <!-- Content Start -->
        <div class="content">
            <!-- Navbar Start -->
            <nav class="navbar navbar-expand bg-light navbar-light sticky-top px-4 py-0">
                <a href="index.html" class="navbar-brand d-flex d-lg-none me-4">
                    <h2 class="text-primary mb-0"><i class="fa fa-hashtag"></i></h2>
                </a>
                <a href="#" class="sidebar-toggler flex-shrink-0">
                    <i class="fa fa-bars"></i>
                </a>
                <form class="d-none d-md-flex ms-4">
                    <input class="form-control border-0" type="search" placeholder="Search">
                </form>
                <div class="navbar-nav align-items-center ms-auto">
                    
                  
                    <div class="nav-item dropdown">
                        <a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown">
                            <img class="rounded-circle me-lg-2"  src=
                            "<?php 
                                if ($this->session->userdata('user_profile') != null) {
                                    echo base_url('/assets/image/profile/'.$this->session->userdata('user_profile'));
                                } else {
                                    echo base_url('/assets/template/admin/images/app/avatar_default.svg');
                                }
                            ?>"
                            alt="user-image" style="width: 40px; height: 40px;">
                            <span class="d-none d-lg-inline-flex"><?php echo $this->session->userdata('user_nama'); ?></span>
                        </a>
                        <div class="dropdown-menu dropdown-menu-end ">
                            <a href="<?= base_url('Admin/Akun/Profile/index/'.$this->session->userdata('user_id')) ?>" class="dropdown-item"><i class="fa fa-user"></i> My Profile</a>
                            <a href="<?php echo site_url('Auth/Login') ?>" class="dropdown-item <?php echo $this->uri->segment(1) == 'Auth/Login' ? 'active' : ''; ?>"><i class='fa fa-sign-out'></i> Log Out</a>
                        </div>
                    </div>
                  
                </div>
            </nav>
            

