<?php
if(session_status() === PHP_SESSION_NONE){
    session_start();
}
?>

<!DOCTYPE html>
<html>
<head>

<title>Digital Panchayat</title>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- MAIN CSS -->
<link rel="stylesheet" href="/digital_panchayat/assets/css/style.css">

<!-- FONT AWESOME -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">

<!-- BOOTSTRAP -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">

<style>

body{
margin:0;
font-family:Segoe UI, Arial;
background:#f4f6f9;
}

/* SIDEBAR */

.sidebar{
width:220px;
height:100vh;
background:#2c3e50;
position:fixed;
top:0;
left:0;
color:white;
overflow-y:auto;
}

/* TOPBAR */

.topbar{
background:white;
padding:15px 25px;
border-bottom:1px solid #ddd;
margin-left:220px;
display:flex;
justify-content:space-between;
align-items:center;
}

/* MAIN CONTENT */

.main{
margin-left:220px;
padding:25px;
}

</style>

</head>

<body>

<!-- SIDEBAR -->
<div class="sidebar">
<?php include __DIR__ . "/sidebar.php"; ?>
</div>

<!-- TOPBAR -->
<div class="topbar">

<h3>Digital Panchayat Admin Panel</h3>

<div>
Welcome <?php echo $_SESSION['name'] ?? 'Admin'; ?>
</div>

</div>