<?php
// 현재 파일명을 가져와서 메뉴 활성화에 사용
$current_page = basename($_SERVER['PHP_SELF']);
?>
<!DOCTYPE html>
<html lang="ko">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <script src="https://cdn.tailwindcss.com"></script>
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
  <style>
    @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');
    body { font-family: 'Noto Sans KR', sans-serif; }
    .nav-active { background-color: rgba(255, 255, 255, 0.1); font-weight: bold; border-bottom: 4px solid rgba(255, 255, 255, 0.4); }
  </style>
</head>
<body class="bg-[#f8fafc]">
<nav class="w-full shadow-md font-['Noto_Sans_KR'] sticky top-0 z-50">
  
  <div class="bg-[#114b3d] text-white">
    <div class="max-w-[1600px] mx-auto px-6 h-16 flex items-center justify-between">
      
      <div class="flex items-center">
        <h1 class="text-xl font-bold flex items-center tracking-tight cursor-pointer" onclick="location.href='index.php'">
          <span class="bg-white text-[#114b3d] p-1 rounded mr-2"><i class="fa-solid fa-graduation-cap"></i></span>
          배움터 <span class="ml-2 text-sm font-light opacity-70">LMS 관리자</span>
        </h1>
      </div>

      <div class="hidden md:flex items-center h-full text-sm">
        <a href="index.php" class="px-5 h-16 flex items-center hover:bg-white/10 transition space-x-2 <?php echo ($current_page == 'index.php') ? 'nav-active' : ''; ?>">
          <i class="fa-solid fa-chart-line opacity-80"></i>
          <span>전체학습현황</span>
        </a>
        <a href="member_list.php" class="px-5 h-16 flex items-center hover:bg-white/10 transition space-x-2 <?php echo ($current_page == 'member_list.php') ? 'nav-active' : ''; ?>">
          <i class="fa-solid fa-users opacity-80"></i>
          <span>학습자관리</span>
        </a>
        <a href="legal_edu.php" class="px-5 h-16 flex items-center hover:bg-white/10 transition space-x-2 <?php echo ($current_page == 'legal_edu.php') ? 'nav-active' : ''; ?>">
          <i class="fa-solid fa-book opacity-80"></i>
          <span>법정의무교육</span>
        </a>
        <a href="content_upload.php" class="px-5 h-16 flex items-center hover:bg-white/10 transition space-x-2 <?php echo ($current_page == 'content_upload.php') ? 'nav-active' : ''; ?>">
          <i class="fa-solid fa-pen-to-square opacity-80"></i>
          <span>콘텐츠 입력</span>
        </a>
        <a href="settings.php" class="ml-2 px-4 h-10 self-center flex items-center bg-white/10 hover:bg-white/20 rounded-lg transition <?php echo ($current_page == 'settings.php') ? 'ring-2 ring-white/50' : ''; ?>">
          <i class="fa-solid fa-gear mr-2"></i>설정
        </a>
      </div>
      
      <div class="flex items-center space-x-4">
        <button class="bg-white/10 hover:bg-white/20 p-2 rounded-full transition"><i class="fa-solid fa-right-from-bracket"></i></button>
      </div>
    </div>
  </div>

  <div class="bg-[#0d3a2f] text-white/90 border-t border-white/5">
    <div class="max-w-[1600px] mx-auto px-6 h-10 flex items-center text-[13px] space-x-8">
      <div class="flex items-center"><span class="opacity-60 mr-2">법인명:</span><span class="font-bold">바른컨설턴트</span></div>
      <div class="flex items-center border-l border-white/10 pl-8"><span class="opacity-60 mr-2">관리자 ID:</span><span class="font-bold">B24064</span></div>
      <div class="flex items-center border-l border-white/10 pl-8"><span class="opacity-60 mr-2">전체 학습자 수:</span><span class="font-bold text-teal-300">74명</span></div>
      <div class="flex items-center border-l border-white/10 pl-8"><span class="opacity-60 mr-2">법정의무교육 기간:</span><span class="font-bold">2026.11.01 ~ 2026.12.15</span></div>
    </div>
  </div>
</nav>
