<?php
/**
 * Admin layout header
 */
if (!defined('APP_PATH')) exit;
$current_user = User::current();
$page_title = $page_title ?? __('admin_panel');
?>
<!DOCTYPE html>
<html lang="<?= e(Lang::current()) ?>">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Admin · <?= e($page_title) ?> - BiteFight</title>
    <link rel="stylesheet" href="<?= APP_URL ?>/assets/css/style.css">
    <link href="https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&display=swap" rel="stylesheet">
</head>
<body>

<header class="header" style="max-width:1200px; margin:1rem auto 0;">
    <a href="<?= APP_URL ?>/admin/index.php" class="logo">⚙ <?= __('admin_panel') ?></a>
    <div class="header-info">
        <span><?= e($current_user['name']) ?> <span class="badge badge-admin">ADMIN</span></span>
        <a href="<?= APP_URL ?>/main.php" class="btn btn-sm btn-secondary">← <?= __('back') ?></a>
        <a href="<?= APP_URL ?>/logout.php" class="btn btn-sm btn-secondary"><?= __('logout') ?></a>
    </div>
</header>

<main class="layout admin-layout">
    <aside class="menu admin-menu">
        <h3><?= __('admin_panel') ?></h3>
        <ul>
            <li><a href="<?= APP_URL ?>/admin/index.php"><?= __('admin_dashboard') ?></a></li>
            <li><a href="<?= APP_URL ?>/admin/users.php"><?= __('admin_users') ?></a></li>
            <li><a href="<?= APP_URL ?>/admin/items.php"><?= __('admin_items') ?></a></li>
            <li><a href="<?= APP_URL ?>/admin/clans.php"><?= __('admin_clans') ?></a></li>
            <li><a href="<?= APP_URL ?>/admin/settings.php"><?= __('admin_settings') ?></a></li>
            <li><a href="<?= APP_URL ?>/admin/logs.php"><?= __('admin_logs') ?></a></li>
        </ul>
    </aside>
    <section class="content">
        <?= flash_render() ?>
