<?php defined('BASEPATH') or exit('No direct script access allowed'); ?>
<!DOCTYPE html>
<html lang="en" class="<?php echo isset($theme_class) ? $theme_class : 'light'; ?>">
<?php
// echo '<pre>';
// print_r(get_defined_vars());
// echo '</pre>';
// exit();

?>
<head>
	<?php $this->load->view('partials/head', isset($head) ? $head : get_defined_vars()); ?>
</head>

<body class="antialiased min-h-screen flex bg-background text-foreground overflow-x-hidden">
	<div id="app-topbar-preload" aria-hidden="true" class="pointer-events-none fixed inset-x-0 top-0 z-[9999] h-1 origin-left scale-x-0 overflow-hidden bg-gradient-to-r from-sky-500 via-violet-500 to-emerald-400 opacity-0 shadow-[0_0_18px_rgba(99,102,241,0.45)] transition-opacity duration-200">
		<span class="absolute inset-y-0 right-0 w-24 bg-white/60 blur-md"></span>
	</div>
	<div id="app-sidebar-shell">
		<?php $this->load->view('partials/sidebar', get_defined_vars()); ?>
	</div>
	<main class="flex min-w-0 flex-1 flex-col relative w-full bg-background">
		<div id="app-header-shell">
			<?php $this->load->view('partials/header', get_defined_vars()); ?>
		</div>
		<div id="app-content" class="min-w-0 w-full px-3 py-2.5 md:px-4 md:py-3 scroll-smooth relative">
			<?php if (!empty($subview)) {
				echo $subview;
			} ?>
		</div>
	</main>
	<?php $this->load->view('partials/scripts', get_defined_vars()); ?>
</body>

</html>
