<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title><?php echo $__env->yieldContent('title', 'Reports System'); ?></title>
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&display=swap" rel="stylesheet">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/line-awesome/1.3.0/line-awesome/css/line-awesome.min.css">
  <style>
    *,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
    :root{
      --bg:#f0f3f8;--white:#ffffff;
      --sidebar-w:240px;--header-h:58px;
      --teal:#00b09b;--teal-dk:#008f7a;--teal-lt:rgba(0,176,155,.10);
      --blue:#1a8fff;--gold:#f5a623;--red:#e74c3c;--purple:#7c6fcd;--green:#28d094;
      --text:#2c3e50;--text-mid:#546e7a;--muted:#90a4ae;
      --border:#e0e7ef;--sh:0 2px 10px rgba(0,0,0,.07);--sh-md:0 4px 20px rgba(0,0,0,.09);
    }

    html, body {
      height: 100%;
      font-family: 'Inter', sans-serif;
      background: var(--bg);
      color: var(--text);
      direction: ltr; /* تم التعديل لليسار */
      overflow-x: hidden;
    }

    ::-webkit-scrollbar{width:5px}
    ::-webkit-scrollbar-track{background:var(--bg)}
    ::-webkit-scrollbar-thumb{background:#cdd5e0;border-radius:10px}

    .app-shell{display:flex;height:100%}

    .sidebar{
      width:var(--sidebar-w);
      height:100vh;
      background:var(--white);
      border-right:1px solid var(--border); /* تعديل لليسار */
      display:flex;
      flex-direction:column;
      position:fixed;
      top:0;left:0; /* تعديل لليسار */
      z-index:200;
      box-shadow:2px 0 12px rgba(0,0,0,.05);
      transition:transform .3s;
      overflow:hidden;
    }
    .sb-brand{height:var(--header-h);display:flex;align-items:center;gap:10px;padding:0 18px;border-bottom:1px solid var(--border);flex-shrink:0}
    .sb-icon{width:36px;height:36px;background:linear-gradient(135deg,var(--teal),var(--teal-dk));border-radius:9px;display:flex;align-items:center;justify-content:center;font-size:17px;box-shadow:0 3px 10px rgba(0,176,155,.3)}
    .sb-name{font-size:17px;font-weight:900;color:var(--text)}.sb-name span{color:var(--teal)}

    .sb-nav{flex:1;padding:8px 0;overflow-y:auto;overflow-x:hidden}
    .nav-sep{font-size:10px;font-weight:700;letter-spacing:1px;color:var(--muted);padding:14px 18px 4px;text-transform:uppercase}
    .nav-item{list-style:none}
    .nav-link{display:flex;align-items:center;gap:9px;padding:9px 16px;color:var(--text-mid);text-decoration:none;font-size:13px;font-weight:500;border-radius:9px;margin:2px 8px;transition:all .16s;position:relative;cursor:pointer}
    .nav-link i{font-size:17px;width:20px;text-align:center;color:var(--muted);flex-shrink:0;transition:color .16s}
    .nav-link:hover{background:var(--bg);color:var(--teal);padding-left:20px} /* تعديل لليسار */
    .nav-link:hover i{color:var(--teal)}
    .nav-link.active{background:var(--teal-lt);color:var(--teal);font-weight:700}
    .nav-link.active i{color:var(--teal)}
    .nav-link.active::before{content:'';position:absolute;left:0;top:20%;height:60%;width:3px;background:var(--teal);border-radius:0 10px 10px 0} /* تعديل لليسار */
    
    .nbadge{margin-left:auto;background:var(--teal);color:#fff;font-size:10px;font-weight:800;padding:2px 7px;border-radius:20px;min-width:20px;text-align:center}

    /* HEADER */
    .header{position:fixed;top:0;left:var(--sidebar-w);right:0;height:var(--header-h);background:var(--white);border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 20px;z-index:100;box-shadow:var(--sh)}
    .hdr-l{display:flex;align-items:center;gap:12px}
    .hdr-r{display:flex;align-items:center;gap:8px}
    .ibtn{width:34px;height:34px;background:var(--bg);border:1px solid var(--border);border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--muted);cursor:pointer;font-size:15px;transition:all .16s;text-decoration:none}
    .ibtn:hover{background:var(--teal-lt);color:var(--teal);border-color:rgba(0,176,155,.3)}
    .hdr-date{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:5px}
    
    .upill{position:relative}
    .ubtn{display:flex;align-items:center;gap:8px;padding:5px 8px 5px 10px;background:var(--bg);border:1px solid var(--border);border-radius:10px;cursor:pointer;transition:background .16s}
    .uavatar{width:30px;height:30px;border-radius:50%;background:linear-gradient(135deg,var(--teal),var(--teal-dk));display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;color:#fff}
    .uname{font-size:12.5px;font-weight:700;color:var(--text)}
    .urole{font-size:10.5px;color:var(--muted)}
    
    .uddrop{position:absolute;top:calc(100% + 6px);right:0;background:var(--white);border:1px solid var(--border);border-radius:10px;width:190px;box-shadow:var(--sh-md);overflow:hidden;display:none;z-index:500;animation:dropIn .18s ease}
    @keyframes dropIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}
    .upill.open .uddrop{display:block}
    .dditem{display:flex;align-items:center;gap:9px;padding:10px 14px;color:var(--text-mid);text-decoration:none;font-size:12.5px;font-weight:500;transition:background .14s}
    .dditem:hover{background:var(--bg)}

    /* MAIN */
    .main{
      margin-left:var(--sidebar-w); /* تعديل لليسار */
      margin-top:var(--header-h);
      flex:1;
      display:flex;
      flex-direction:column;
      min-height:calc(100vh - var(--header-h));
      overflow-y:auto;
    }
    .content{flex:1;padding:22px 22px 0;animation:fadeUp .35s ease both}
    .footer{padding:13px 22px;border-top:1px solid var(--border);background:var(--white);display:flex;align-items:center;justify-content:space-between;font-size:11.5px;color:var(--muted);margin-top:22px;flex-shrink:0}
    .ftbrand{display:flex;align-items:center;gap:5px;font-weight:600;color:var(--text-mid)}

    @media(max-width:768px){
      .sidebar{transform:translateX(-100%)} /* تعديل لليسار */
      .sidebar.open{transform:translateX(0)}
      .header{left:0}.main{margin-left:0}
    }
  </style>
  <?php echo $__env->yieldContent('styles'); ?>
</head>
<body>
<div class="app-shell">

  <aside class="sidebar" id="sidebar">
    <div class="sb-brand">
      <div class="sb-icon">📊</div>
      <div class="sb-name"><span>Reports</span> </div>
    </div>
    <nav class="sb-nav">
      <ul style="list-style:none">
        <li class="nav-sep">Main</li>
        <li class="nav-item">
          <a class="nav-link <?php echo e(request()->routeIs('admin.dashboard') ? 'active' : ''); ?>" href="<?php echo e(route('admin.dashboard')); ?>">
            <i class="las la-th-large"></i><span>Dashboard</span>
          </a>
        </li>

        <li class="nav-sep">QR Code</li>
        <li class="nav-item">
          <a class="nav-link <?php echo e(request()->routeIs('reports.upload') ? 'active' : ''); ?>" href="<?php echo e(route('reports.upload')); ?>">
            <i class="las la-file-upload"></i><span>Upload Excel</span>
          </a>
        </li>

        <li class="nav-item">
          <a class="nav-link <?php echo e(request()->routeIs('reports.index') ? 'active' : ''); ?>" href="<?php echo e(route('reports.index')); ?>">
           <i class="las la-qrcode"></i><span>View Transactions</span>
          </a>
        </li>
 <li class="nav-sep">Pos</li>
        <li class="nav-item">
          <a class="nav-link <?php echo e(request()->routeIs('posreports.upload') ? 'active' : ''); ?>" href="<?php echo e(route('posreports.upload')); ?>">
            <i class="las la-file-upload"></i><span>Upload Excel</span>
          </a>
        </li>

        <li class="nav-item">
          <a class="nav-link <?php echo e(request()->routeIs('posreports.index') ? 'active' : ''); ?>" href="<?php echo e(route('posreports.index')); ?>">
           <i class="las la-table"></i><span>View Transactions</span>
          </a>
        </li>
        
        <li class="nav-sep">Users</li>
<li class="nav-item">
  <a class="nav-link <?php echo e(request()->routeIs('users.index') ? 'active' : ''); ?>" href="<?php echo e(route('users.index')); ?>">
    <i class="las la-users"></i><span>All Users</span>
  </a>
</li>

<li class="nav-item">
  <a class="nav-link <?php echo e(request()->routeIs('users.create') ? 'active' : ''); ?>" href="<?php echo e(route('users.create')); ?>">
    <i class="las la-user-plus"></i><span>Create User</span>
  </a>
</li>
        
        <!--<li class="nav-item">-->
        <!--  <a class="nav-link <?php echo e(request()->routeIs('reports.summary') ? 'active' : ''); ?>" href="<?php echo e(route('reports.summary')); ?>">-->
        <!--    <i class="las la-chart-bar"></i><span>Summary Reports</span>-->
        <!--  </a>-->
        <!--</li>-->
      </ul>
    </nav>
  </aside>

  <div class="sb-overlay" id="sbOverlay" onclick="closeSB()"></div>

  <header class="header">
    <div class="hdr-l">
      <div class="ibtn" onclick="toggleSB()"><i class="las la-bars"></i></div>
    </div>
    <div class="hdr-r">
      <div class="hdr-date"><i class="las la-calendar-alt"></i><span id="hdrDate"></span></div>
      <div class="notif-w ibtn"><i class="las la-bell"></i><span class="ndot"></span></div>
      <a class="ibtn" onclick="toggleFS()"><i class="las la-expand"></i></a>
      <div class="upill" id="upill">
        <div class="ubtn" onclick="toggleU()">
          <div class="uavatar"><?php echo e(mb_substr(Auth::user()->name,0,1)); ?></div>
          <div>
            <div class="uname"><?php echo e(Auth::user()->name); ?></div>
            <div class="urole">
              <?php if(auth()->user()->role_id==1): ?> Admin <?php elseif(auth()->user()->role_id==2): ?> User <?php else: ?> Supervisor <?php endif; ?>
            </div>
          </div>
          <i class="las la-angle-down" style="color:var(--muted);font-size:12px;margin-left:5px"></i>
        </div>
        <div class="uddrop">
          <a class="dditem" href="<?php echo e(route('admin.edit')); ?>"><i class="las la-user-edit"></i> Edit Profile</a>
          <div class="ddsep"></div>
          <a class="dditem danger" href="<?php echo e(route('logout')); ?>"><i class="las la-power-off"></i> Logout</a>
        </div>
      </div>
    </div>
  </header>

  <div class="main">
    <div class="content">
      <?php if($errors->count()): ?><div class="alert alert-danger"><i class="las la-exclamation-circle"></i><div><ul><?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $e): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><li><?php echo e($e); ?></li><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?></ul></div></div><?php endif; ?>
      <?php if(session()->has('success')): ?><div class="alert alert-success"><i class="las la-check-circle"></i><div><?php echo e(session('success')); ?></div></div><?php endif; ?>
      <?php if(session()->has('error')): ?><div class="alert alert-danger"><i class="las la-exclamation-circle"></i><div><?php echo e(session('error')); ?></div></div><?php endif; ?>
      <?php echo $__env->yieldContent('content'); ?>
    </div>
    <footer class="footer">
      <span>All Rights Reserved &copy; <?php echo e(date('Y')); ?> — Reports System</span>
      <div class="ftbrand"><i class="las la-shield-alt"></i><span>Secure Portal</span></div>
    </footer>
  </div>
</div>

<script>
  function toggleU(){document.getElementById('upill').classList.toggle('open')}
  document.addEventListener('click',e=>{const m=document.getElementById('upill');if(m&&!m.contains(e.target))m.classList.remove('open')})
  function toggleSB(){document.getElementById('sidebar').classList.toggle('open')}
  function closeSB(){document.getElementById('sidebar').classList.remove('open')}
  function toggleFS(){if(!document.fullscreenElement)document.documentElement.requestFullscreen?.();else document.exitFullscreen?.()}
  
  // تحديث التاريخ ليكون بالإنجليزية
  const _d = new Date();
  document.getElementById('hdrDate').textContent = _d.toLocaleDateString('en-US', {weekday:'long', year:'numeric', month:'long', day:'numeric'});
  
  setTimeout(()=>{document.querySelectorAll('.alert').forEach(a=>{a.style.transition='opacity .5s';a.style.opacity='0';setTimeout(()=>a.remove(),500)})},4500)
</script>
<?php echo $__env->yieldContent('scripts'); ?>
</body>
</html><?php /**PATH /home/gamcoiraq/sctlold.gamcoiraq.com/resources/views/admin/layouts/app.blade.php ENDPATH**/ ?>