<?php
session_start();

require_once '../../config/database.php';
require_once '../../includes/auth.php';

$basePath = '../../';
include '../../includes/header.php';
?>

<div class="container mt-4">

    <div class="d-flex justify-content-between align-items-center mb-3">
        <h3>Add New Category</h3>

        <a href="index.php" class="btn btn-secondary">
            Back to Categories
        </a>
    </div>

    <div class="card shadow-sm">
        <div class="card-body">

            <form action="save.php" method="POST">

                <div class="mb-3">
                    <label class="form-label">Category Name</label>

                    <input
                        type="text"
                        name="name"
                        class="form-control"
                        required
                        autofocus
                    >
                </div>

                <button type="submit" class="btn btn-success">
                    Save Category
                </button>

                <a href="index.php" class="btn btn-secondary">
                    Cancel
                </a>

            </form>

        </div>
    </div>

</div>

<?php include '../../includes/footer.php'; ?>