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

/* Check Login */
if(!isset($_SESSION['user_id'])){
    header("Location: ../admin/login.php");
    exit;
}
?>

<!DOCTYPE html>
<html>
<head>

<title>Operator Panel</title>

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

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

<!-- OPERATOR CSS -->
<link rel="stylesheet" href="operator.css">

<style>

/* ===== TOP BAR (UPGRADED) ===== */
.topbar{
    background: linear-gradient(135deg,#2c3e50,#34495e);
    color:white;
    padding:10px 15px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    position:sticky;
    top:0;
    z-index:1000;
    box-shadow:0 2px 6px rgba(0,0,0,0.2);
}

.topbar h4{
    margin:0;
    font-size:15px;
    font-weight:600;
}

.user-name{
    font-size:12px;
    opacity:0.9;
}

/* ===== MAIN ===== */
.main{
    padding:12px;
    padding-bottom:75px;
}

/* ===== CARD LOOK (GLOBAL USE) ===== */
.card-ui{
    background:#fff;
    border-radius:12px;
    padding:12px;
    margin-bottom:12px;
    box-shadow:0 2px 8px rgba(0,0,0,0.05);
}

/* ===== BUTTONS ===== */
.btn-ui{
    display:inline-block;
    padding:6px 10px;
    font-size:12px;
    border-radius:6px;
    text-decoration:none;
}

.btn-primary-ui{
    background:#2c3e50;
    color:white;
}

/* ===== BOTTOM NAV (MODERN APP STYLE) ===== */
.bottom-nav{
    position:fixed;
    bottom:0;
    left:0;
    width:100%;
    background:#ffffff;
    display:flex;
    justify-content:space-around;
    padding:6px 0;
    border-top:1px solid #eee;
    box-shadow:0 -2px 8px rgba(0,0,0,0.05);
    z-index:1000;
}

.bottom-nav a{
    flex:1;
    text-align:center;
    font-size:11px;
    color:#666;
    text-decoration:none;
    padding:4px 0;
    transition:0.2s;
}

.bottom-nav i{
    display:block;
    font-size:18px;
    margin-bottom:2px;
}

/* ACTIVE NAV */
.bottom-nav a.active{
    color:#2c3e50;
    font-weight:600;
}

.bottom-nav a.active i{
    transform:scale(1.1);
}

/* TOUCH EFFECT */
.bottom-nav a:active{
    transform:scale(0.95);
}

</style>

</head>

<body>

<!-- TOP BAR -->
<div class="topbar">

<h4>📍 Digital Panchayat</h4>

<div class="user-name">
👤 <?php echo $_SESSION['name']; ?>
</div>

</div>

<!-- MAIN START -->
<div class="main">