<?php $loggedIn = \App\Auth\AdminAuth::check(); ?>
<!doctype html>
<html lang="ko">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <meta name="robots" content="noindex,nofollow,noarchive">
  <title><?= e($title ?? '관리자') ?> | <?= e(config('app.legal_name')) ?> 관리자</title>
  <link rel="stylesheet" href="<?= e(asset('css/site.css')) ?>">
  <link rel="stylesheet" href="<?= e(asset('css/content.css')) ?>">
  <link rel="stylesheet" href="<?= e(asset('css/admin.css')) ?>">
</head>
<body class="admin-body">
  <a class="skip-link" href="#admin-main">본문 바로가기</a>
  <header class="admin-header"><div class="admin-header-inner"><a class="admin-brand" href="/admin"><img class="brand-logo" src="<?= e(asset('images/company-logo-v3.png')) ?>" alt="" width="60" height="28"><strong><?= e(config('app.legal_name')) ?> 관리자 콘솔</strong></a><?php if ($loggedIn): ?><div class="admin-account"><span><?= e($_SESSION['admin']['display_name']) ?></span><a class="button button-secondary button-small" href="/">사이트 보기</a><form method="post" action="/admin/logout"><?= csrf_field() ?><button type="submit">로그아웃</button></form></div><?php endif; ?></div></header>
  <?php if ($loggedIn): ?><nav class="admin-nav" aria-label="관리 메뉴"><div><a href="/admin"<?= is_active_path('/admin') && !is_active_path('/admin/posts') && !is_active_path('/admin/inquiries') && !is_active_path('/admin/company') ? ' aria-current="page"' : '' ?>>대시보드</a><a href="/admin/posts"<?= is_active_path('/admin/posts') ? ' aria-current="page"' : '' ?>>글 관리</a><a href="/admin/inquiries"<?= is_active_path('/admin/inquiries') ? ' aria-current="page"' : '' ?>>문의 관리</a><a href="/admin/company"<?= is_active_path('/admin/company') ? ' aria-current="page"' : '' ?>>회사 정보</a></div></nav><?php endif; ?>
  <main id="admin-main" class="admin-main"><?= $content ?></main>
</body>
</html>
