<h4>Shell Rebuild — Controlled v7 Migration</h4>
<p>Complete rebuild of all 7 shell files following the controlled execution plan (PLAN_SHELL.md). All files rebuilt from scratch using UBold v7 topbar-gray demo as source of truth.</p>

<h5>Files Rebuilt (Steps 5-11)</h5>
<ul>
<li><b>head.php</b> — Clean v7 document head: config.js → vendors.min.css → app.min.css → FA6 → jQuery. Shell config enforcement script prevents stale sessionStorage from overriding gray topbar.</li>
<li><b>main.template.php</b> — v7 shell assembler: wrapper → sidenav → topbar → content-page → container-fluid → toolbar → module content → footer (inside content-page) → modals outside wrapper. Loading overlay with auto-dismiss.</li>
<li><b>topbar.php</b> — v7 gray topbar with all 3 dropdowns rebuilt to v7 pattern: notifications (dropdown-menu-lg + simplebar), shopping cart (dropdown-menu-lg), user dropdown (v7 profile dropdown with notify-item class). 32px avatar with dedicated class. Theme toggle (light/dark/system) using v7 native radio pattern.</li>
<li><b>sidebar.main.php</b> — v7 sidenav-menu with logo, button-on-hover, button-close-offcanvas, simplebar scrollbar, sidenav-user block, side-nav menu with v7 classes.</li>
<li><b>toolbar.php</b> — v7 page-title-head pattern with dynamic title, breadcrumbs, and help dropdown.</li>
<li><b>sidebar.hidden.chat.php</b> — Right chat drawer using CSS variables for automatic light/dark support.</li>
<li><b>foot.php</b> — Shell JS loader: vendors.min.js → app.js → platform plugins → runtime JS. All missing plugins restored (TouchSpin, bootstrap-select, counterUp, maxlength, filestyle, knob, jquery-validate, tablesorter, SweetAlert CSS).</li>
</ul>

<h5>Theme System (Step 12)</h5>
<ul>
<li>Gray topbar: <code>data-topbar-color="gray"</code> (#e9ebef light, #252630 dark)</li>
<li>Light sidebar: <code>data-menu-color="light"</code> (#fff)</li>
<li>Three modes: Light, Dark, System — all via v7 native LayoutCustomizer</li>
<li>SessionStorage enforcement prevents stale configs from prior attempt</li>
<li>Tenant CSS override removed from shell (deferred to Phase 2+)</li>
</ul>

<h5>Layout Fixes</h5>
<ul>
<li>Footer pinned inside content-page via flex layout (margin-top:auto)</li>
<li>Condensed sidebar scrollable (overflow-y:auto) for 20+ menu items</li>
<li>Wrapper min-height:100vh for proper condensed sidebar height</li>
<li>SweetAlert CSS restored — hidden dialog no longer displaces layout</li>
<li>Right chat drawer background fixed</li>
<li>Fullscreen toggle: icons wrapped in span to avoid FA6 display override</li>
</ul>

<h5>Shell Validation (Steps 13-14)</h5>
<ul>
<li>Zero PHP errors across 5 tested pages</li>
<li>Zero JS console errors across 5 tested pages</li>
<li>All backups preserved as filename-bk-v4.ext</li>
</ul>