<!DOCTYPE html>
<html lang="<?php echo e(str_replace('_', '-', app()->getLocale())); ?>">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><?php echo $__env->yieldContent('title', 'TechCorp Manager'); ?></title>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="<?php echo e(asset('css/techcorp.css')); ?>">
</head>
<body class="tc-body">
<?php
    $user = auth()->user();
    $name = $user?->name ?? 'User';
    $parts = preg_split('/\s+/', trim($name));
    $initials = count($parts) >= 2
        ? strtoupper(substr($parts[0], 0, 1) . substr(end($parts), 0, 1))
        : strtoupper(substr($name, 0, 2));
?>
<div class="tc-app">
    <button type="button" class="tc-mobile-toggle" id="tc-menu-btn" aria-label="Menu">☰</button>
    <div class="tc-overlay" id="tc-overlay"></div>
    <aside class="tc-sidebar" id="tc-sidebar">
        <div class="tc-sidebar-head">
            <h1>TechCorp</h1>
            <span>Management System</span>
        </div>
        <div class="tc-nav-title">Main menu</div>
        <nav class="tc-nav">
            <a href="<?php echo e(route('web.dashboard')); ?>" class="<?php echo e(request()->routeIs('web.dashboard') ? 'active' : ''); ?>">📊 Dashboard</a>
            <a href="<?php echo e(route('web.projects.index')); ?>" class="<?php echo e(request()->routeIs('web.projects.index') ? 'active' : ''); ?>">🎯 Projects</a>
            <a href="<?php echo e(route('web.clients.index')); ?>" class="<?php echo e(request()->routeIs('web.clients.index') ? 'active' : ''); ?>">👥 Clients</a>
            <a href="<?php echo e(route('web.invoices.index')); ?>" class="<?php echo e(request()->routeIs('web.invoices.index') ? 'active' : ''); ?>">📄 Invoices</a>
            <a href="<?php echo e(route('web.servers.index')); ?>" class="<?php echo e(request()->routeIs('web.servers.index') ? 'active' : ''); ?>">🖥 Servers</a>
            <a href="<?php echo e(route('web.domains.index')); ?>" class="<?php echo e(request()->routeIs('web.domains.index') ? 'active' : ''); ?>">🌐 Domains</a>
            <a href="<?php echo e(route('web.team.index')); ?>" class="<?php echo e(request()->routeIs('web.team.index') ? 'active' : ''); ?>">👔 Team</a>
            <a href="<?php echo e(route('web.reports.index')); ?>" class="<?php echo e(request()->routeIs('web.reports.index') ? 'active' : ''); ?>">📈 Reports</a>
        </nav>
        <div class="tc-sidebar-foot">
            <div class="tc-user">
                <div class="tc-avatar"><?php echo e($initials); ?></div>
                <div class="tc-user-meta">
                    <h4><?php echo e($name); ?></h4>
                    <span><?php echo e($user?->role ? str_replace('_', ' ', $user->role) : 'Signed in'); ?></span>
                </div>
            </div>
            <form action="<?php echo e(route('logout')); ?>" method="post">
                <?php echo csrf_field(); ?>
                <button type="submit" class="tc-logout">🚪 Logout</button>
            </form>
        </div>
    </aside>
    <main class="tc-main">
        <?php echo $__env->yieldContent('content'); ?>
    </main>
</div>
<?php if(auth()->guard()->check()): ?>
<div id="tc-modal-backdrop" class="tc-modal-backdrop" aria-hidden="true">
    <div class="tc-modal-panel" role="dialog" aria-modal="true" aria-labelledby="tc-modal-title">
        <div class="tc-modal-head">
            <h3 id="tc-modal-title"></h3>
            <button type="button" class="tc-modal-close" aria-label="Close">&times;</button>
        </div>
        <div id="tc-modal-body" class="tc-modal-body"></div>
    </div>
</div>
<script>
window.__TECHCORP__ = {
    apiBase: <?php echo json_encode(url('/api'), 15, 512) ?>,
    token: <?php echo json_encode(session('api_token'), 15, 512) ?>,
};
</script>
<script src="<?php echo e(asset('js/techcorp-api.js')); ?>" defer></script>
<?php endif; ?>
<script>
(function () {
    var btn = document.getElementById('tc-menu-btn');
    var side = document.getElementById('tc-sidebar');
    var overlay = document.getElementById('tc-overlay');
    if (!btn || !side || !overlay) return;
    btn.addEventListener('click', function () {
        side.classList.toggle('open');
        overlay.classList.toggle('open');
    });
    overlay.addEventListener('click', function () {
        side.classList.remove('open');
        overlay.classList.remove('open');
    });
    side.querySelectorAll('a').forEach(function (a) {
        a.addEventListener('click', function () {
            side.classList.remove('open');
            overlay.classList.remove('open');
        });
    });
})();
</script>
</body>
</html>
<?php /**PATH C:\Users\pc\Desktop\compnany\laravel-api\resources\views/layouts/app.blade.php ENDPATH**/ ?>