# Compact Nav-Bar Header Redesign — Session Reference ## User Design Preferences (Ray) - **Minimal header** — no logo, no title/subtitle section. Just the nav bar. - **Mobile page title** — show the current page name centered on mobile between the hamburger and controls. - **Dark mode toggle + user menu** — inline in the nav bar, right-aligned. - **Clean, readable colors** — white/dark cards with colored accent borders, never colored-text-on-colored-bg. - **High contrast** — bold dark text on light bg, bold light text on dark bg. No washed-out grays. - **Card depth** — subtle gradient + noticeable border in light mode, not flat white. ## Persistent UI Bugs Fixed This Session ### Dropdown Clipped by Content Below The user account dropdown appeared behind the "overdue tasks" cards on the dashboard. **Root cause:** The outer header wrapper `
` had no `position` or `z-index` set. Even though the `#user-dropdown` had `z-index: 10001`, its parent wrapper was a sibling of the main content div in the DOM. Since main content comes after the header in DOM order, it painted on top. Additionally, the CSS variable `--z-critical` was used in `#user-dropdown { z-index: var(--z-critical); }` but never defined anywhere. **Fix (3 parts):** 1. Added `position: relative; z-index: 1000` to the outer header wrapper div (creates stacking context at body level) 2. Added `:root { --z-critical: 999999; }` to `style.css` 3. Added `.user-menu-container { overflow: visible !important; position: relative !important; }` to `style.css` 4. Removed `overflow-hidden` Tailwind class from `.header-card` elements on all 4 pages ## Header HTML Template ```html
``` ## Key Pattern: Active Link Per Page When constructing the header for each page, only ONE nav link should use the active style (`bg-white/20 text-white shadow-sm`). All others use inactive (`text-blue-100 hover:...`). This applies to both desktop and mobile nav link lists. ## ⚠️ Critical: Z-Index for Dropdown After Header Redesign After removing the tall header section, the user account dropdown will likely appear behind page content. **This must be fixed separately from the header HTML changes.** The outer header wrapper needs: ```html
``` Additionally: - Remove `overflow-hidden` from the header-card class list (conflicts with dropdown overflow) - Define `:root { --z-critical: 999999; }` in style.css if `var(--z-critical)` is referenced - Ensure `.user-menu-container { overflow: visible !important; }` is in the CSS See section 7 of the SKILL.md for the full diagnosis and fix checklist. ## ⚠️ Duplicate CSS Selectors Some pages accumulated multiple `.dashboard-card` definitions in the same `