<?php defined('BASEPATH') or exit('No direct script access allowed');
$is_client_panel = (int) ($this->session->userdata('user_type') ?? 0) === 2;
?>
<!DOCTYPE html>
<html lang="en" class="<?php echo isset($theme_class) ? $theme_class : 'light'; ?>">

<head>
	<?php $this->load->view('partials/head', isset($head) ? $head : get_defined_vars()); ?>
	<?php if ($is_client_panel) { ?>
		<style>
			.client-panel .dt-bulk-delete,
			.client-panel [data-bulk-delete],
			.client-panel [id$="BulkDelete"],
			.client-panel [id*="BulkDelete"],
			.client-panel #bulk_delete {
				display: none !important;
				visibility: hidden !important;
			}
		</style>
	<?php } ?>
</head>

<body class="antialiased min-h-screen flex bg-background text-foreground overflow-x-hidden <?= $is_client_panel ? 'client-panel' : ''; ?>">
	<?php $this->load->view('partials/sidebar', get_defined_vars()); ?>
	<main class="flex min-w-0 flex-1 flex-col overflow-hidden relative w-full bg-background">
		<?php if (empty($hide_top_header)) {
			$this->load->view('partials/header', get_defined_vars());
		} ?>
		<div id="app-content" class="min-w-0 w-full overflow-x-hidden p-3 scroll-smooth relative md:p-6">
			<?php if (!empty($subview)) {
				echo $subview;
			} ?>
		</div>
	</main>
	<?php $this->load->view('partials/scripts', get_defined_vars()); ?>
</body>

</html>
