<?php
session_start();
require_once __DIR__ . '/../config/db_admin.php';

$user = [
    'name' => $_SESSION['user_name'] ?? 'System Admin',
    'email' => $_SESSION['email'] ?? 'admin@marketplace.com',
    'designation' => $_SESSION['designation'] ?? 'Marketplace Admin',
    'phone' => $_SESSION['phone'] ?? '+880 1700-000001'
];
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Profile Settings - Admin Console</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap" rel="stylesheet">
    <style>
        body { font-family: 'Plus Jakarta Sans', sans-serif; }
        .font-mono-custom { font-family: 'JetBrains Mono', monospace; }
    </style>
</head>
<body class="bg-slate-950 text-slate-100 min-h-screen">

    <!-- Top Navigation Header -->
    <header class="border-b border-slate-800 bg-slate-900/90 backdrop-blur sticky top-0 z-50">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-16 flex items-center justify-between">
            <div class="flex items-center space-x-3">
                <div class="bg-amber-500 p-2 rounded-xl text-slate-950 font-black text-lg">
                    🛡️
                </div>
                <div>
                    <span class="font-extrabold text-base tracking-tight text-white">Garments B2B</span>
                    <span class="ml-2 text-[10px] bg-amber-500/10 text-amber-400 border border-amber-500/30 px-2 py-0.5 rounded font-mono-custom font-bold uppercase">Admin Console</span>
                </div>
            </div>

            <!-- Header Menu Nav -->
            <nav class="flex items-center space-x-1.5 overflow-x-auto">
                <a href="/admin/dashboard.php" class="px-3 py-1.5 rounded-lg text-xs font-semibold text-slate-400 hover:text-white transition">Dashboard</a>
                <a href="/admin/users.php" class="px-3 py-1.5 rounded-lg text-xs font-semibold text-slate-400 hover:text-white transition">User</a>
                <a href="/admin/employees.php" class="px-3 py-1.5 rounded-lg text-xs font-semibold text-slate-400 hover:text-white transition">Employee</a>
                <a href="/admin/factories.php" class="px-3 py-1.5 rounded-lg text-xs font-semibold text-slate-400 hover:text-white transition">My Factories</a>
                <a href="/admin/analysis.php" class="px-3 py-1.5 rounded-lg text-xs font-semibold text-slate-400 hover:text-white transition">Order Analysis</a>
                <a href="/admin/profile.php" class="px-3 py-1.5 rounded-lg text-xs font-bold bg-amber-500 text-slate-950 shadow transition">Profile Settings</a>
                <a href="/auth/login.php" class="px-3 py-1.5 rounded-lg text-xs font-bold text-rose-400 hover:text-rose-300 transition border border-rose-500/20">Logout</a>
            </nav>
        </div>
    </header>

    <!-- Main Content Container -->
    <main class="max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-6">
        <div class="bg-slate-900 border border-slate-800 rounded-2xl p-6 shadow-xl space-y-6">
            <h1 class="text-2xl font-bold text-white">Profile Settings</h1>
            
            <div class="space-y-4 text-xs">
                <div>
                    <label class="block text-slate-400 mb-1 font-semibold">Administrator Name</label>
                    <input type="text" value="<?= htmlspecialchars($user['name']) ?>" readonly class="w-full bg-slate-950 border border-slate-800 rounded-xl px-4 py-2.5 text-white font-semibold cursor-not-allowed">
                </div>
                <div>
                    <label class="block text-slate-400 mb-1 font-semibold">System Email Address</label>
                    <input type="email" value="<?= htmlspecialchars($user['email']) ?>" readonly class="w-full bg-slate-950 border border-slate-800 rounded-xl px-4 py-2.5 text-white font-semibold cursor-not-allowed">
                </div>
                <div>
                    <label class="block text-slate-400 mb-1 font-semibold">Official Designation</label>
                    <input type="text" value="<?= htmlspecialchars($user['designation']) ?>" readonly class="w-full bg-slate-950 border border-slate-800 rounded-xl px-4 py-2.5 text-amber-400 font-semibold cursor-not-allowed">
                </div>
                <div>
                    <label class="block text-slate-400 mb-1 font-semibold">Phone Contact Number</label>
                    <input type="text" value="<?= htmlspecialchars($user['phone']) ?>" readonly class="w-full bg-slate-950 border border-slate-800 rounded-xl px-4 py-2.5 text-white font-mono-custom cursor-not-allowed">
                </div>
            </div>
        </div>
    </main>

</body>
</html>
