/* ═══════════════════════════════════════════════════════════════
   Z-INDEX NORMALIZATION — v2603080100
   ═══════════════════════════════════════════════════════════════
   Replaces extreme z-index values (>10000) with a sane scale.
   Appended LAST to the bundle so cascade wins.
   Uses !important to override earlier !important rules in visual-fixes.css.
   
   Normalized Scale (nothing exceeds 9999):
     1000-1999  Dropdowns, tooltips (inline)
     2000-2999  Sticky headers, navbars
     3000-3999  Modals, overlays (standard)
     4000-4999  Toasts, notifications
     5000-5099  Critical overlays (editors, gamification modals)
     5100-5199  Tunnel editor overlays
     5200-5299  Academy overlays, lesson modals
     5500-5699  XP & level-up popups, achievement toasts
     6000-6099  Portal modals
     6500-6599  Report/vision overlays
     7000-7099  Gamification RPG, confetti, easter eggs
     7200-7299  CRM toast, generic toasts
     7500-7599  WYSIWYG toolbar/menus
     8000-8099  WYSIWYG modals, DB overlays
     8500-8599  Focus mode, AI reorganize, academy fullscreen
     9000-9099  Fullscreen previews, galaxy overlays
     9500-9599  Global tooltips (.ptip), drag-drop, mobile overlays
     9800-9899  Maha creator overlay
     9900-9999  Payment panels (absolute ceiling)
   ═══════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────
   TIER 5000-5099 — Critical overlays (were z-index: 10000)
   ────────────────────────────────────────────────────────────── */

/* gamification-premium.css: .gv-levelup-overlay z:10000 */
.gv-levelup-overlay { z-index: 5000 !important; }

/* productive-tools.css: .pt2-modal-ov z:10000 */
.pt2-modal-ov { z-index: 5010 !important; }

/* giri-crm.css: .gcrm-email-overlay z:10000 */
.gcrm-email-overlay { z-index: 5020 !important; }

/* giri-crm-ai.css: modal z:10000 */
.gcrm-ai-modal { z-index: 5030 !important; }

/* giri-crm.css: floating button z:10000 */
.gcrm-fab { z-index: 5000 !important; }

/* ──────────────────────────────────────────────────────────────
   TIER 5100-5199 — Tunnel editor (were 10000-10200)
   ────────────────────────────────────────────────────────────── */

/* tunnel-visual-editor.css: .ve-overlay z:10000 */
.ve-overlay { z-index: 5100 !important; }

/* tunnel-visual-editor.css: .ve-undo-toast z:10100 */
.ve-undo-toast { z-index: 5110 !important; }

/* tunnel-visual-editor.css: .ve-tooltip z:10200 */
.ve-tooltip { z-index: 5120 !important; }

/* ──────────────────────────────────────────────────────────────
   TIER 5200-5299 — Academy/lesson overlays (were 10200-12000)
   ────────────────────────────────────────────────────────────── */

/* academy-student-dashboard.css: .asd-overlay z:10200 */
.asd-overlay { z-index: 5200 !important; }

/* lesson-interactions.css: .svp-sprint-modal z:12000 */
.svp-sprint-modal { z-index: 5210 !important; }

/* ──────────────────────────────────────────────────────────────
   TIER 5500-5699 — XP & Level-up (were 10000-10020)
   Overrides visual-fixes.css !important declarations.
   ────────────────────────────────────────────────────────────── */

/* XP popup container (gamification-rpg.css:99999, visual-fixes:10000!i) */
#xp-popup-container { z-index: 5500 !important; }

/* Level-up overlay (gamification-rpg.css:999999, visual-fixes:10001!i) */
#levelup-overlay { z-index: 5510 !important; }

/* achievement-notifier.js inline: .an-toast z:10015 */
.an-toast { z-index: 5520 !important; }

/* achievement-notifier.js inline: .an-overlay z:10020 */
.an-overlay { z-index: 5530 !important; }

/* xp-engine.js inline: .xpe-float z:10001 */
.xpe-float { z-index: 5540 !important; }
.xpe-streak-bonus { z-index: 5541 !important; }
.xpe-first-day { z-index: 5541 !important; }
.xpe-challenge-toast { z-index: 5541 !important; }
.xpe-combo-popup { z-index: 5542 !important; }
.xpe-levelup-overlay { z-index: 5550 !important; }

/* gamif-streak-ui.js inline: toast z:10000 */
.gs-toast { z-index: 5560 !important; }

/* ──────────────────────────────────────────────────────────────
   TIER 6000-6099 — Portal modals (were 99000)
   ────────────────────────────────────────────────────────────── */

/* client-portal.css: .cp-modal z:99000 */
.cp-modal { z-index: 6000 !important; }

/* ──────────────────────────────────────────────────────────────
   TIER 6500-6599 — Report/vision overlays (were 99999)
   ────────────────────────────────────────────────────────────── */

/* giri-report.css: .gr-toast z:99999 */
.gr-toast { z-index: 6500 !important; }

/* giri-vision.css: .vision-replay-modal z:99999 */
.vision-replay-modal { z-index: 6510 !important; }

/* ──────────────────────────────────────────────────────────────
   TIER 7000-7099 — Gamification RPG, confetti, easter eggs
   ────────────────────────────────────────────────────────────── */

/* gamification-rpg.css: #xp-popup-container z:99999 — already handled above */

/* gamification-rpg.css: #levelup-overlay z:999999 — already handled above */

/* CRM toast (visual-fixes.css had 9500!i) — bring to sane level */
.gcrm-toast { z-index: 4500 !important; }

/* ──────────────────────────────────────────────────────────────
   TIER 7500-7599 — WYSIWYG & tunnel editors (were 100000-100001)
   ────────────────────────────────────────────────────────────── */

/* tunnel-wysiwyg.css: .tc-wysiwyg-toolbar z:100000 */
.tc-wysiwyg-toolbar { z-index: 7500 !important; }

/* tunnel-wysiwyg.css: .tc-wysiwyg-section-menu z:100001 */
.tc-wysiwyg-section-menu { z-index: 7510 !important; }

/* ──────────────────────────────────────────────────────────────
   TIER 8000-8099 — WYSIWYG modals, DB overlays (were 200000)
   ────────────────────────────────────────────────────────────── */

/* tunnel-wysiwyg.css: .tc-wysiwyg-modal-overlay z:200000 */
.tc-wysiwyg-modal-overlay { z-index: 8000 !important; }

/* bundle: .db-overlay z:200000 */
.db-overlay { z-index: 8010 !important; }

/* ──────────────────────────────────────────────────────────────
   TIER 8500-8599 — Focus mode, AI reorg, academy fullscreen
   (were 999998-999999)
   ────────────────────────────────────────────────────────────── */

/* focus-mode.css: .focus-overlay z:999998 */
.focus-overlay { z-index: 8500 !important; }

/* focus-mode.css: .focus-select-overlay z:999999 */
.focus-select-overlay { z-index: 8510 !important; }

/* tasks-ai-reorganize.css: .air-overlay z:999999 */
.air-overlay { z-index: 8520 !important; }

/* tasks-ai-reorganize.css: .air-tip z:99999 */
.air-tip { z-index: 8530 !important; }

/* giri-academy.css: .pb-html-live-wrap.pb-html-fullscreen z:999999 */
.pb-html-live-wrap.pb-html-fullscreen { z-index: 8540 !important; }

/* ──────────────────────────────────────────────────────────────
   TIER 9000-9099 — Fullscreen previews (were 1999999)
   ────────────────────────────────────────────────────────────── */

/* tunnel-club.css: .tc-preview-fullscreen z:1999999 */
.tc-preview-fullscreen { z-index: 9000 !important; }

/* ──────────────────────────────────────────────────────────────
   TIER 9500-9599 — Global tooltips, drag-drop, mobile
   (were 2000000, 99999)
   ────────────────────────────────────────────────────────────── */

/* tooltips.css: .ptip z:2000000 */
.ptip { z-index: 9500 !important; }

/* mobile-revolution.css: overlay z:99999 */
.mr-mobile-menu { z-index: 9520 !important; }

/* mahayawen-mobile.css: overlay z:99999 */
.maha-mobile-overlay { z-index: 9530 !important; }

/* ──────────────────────────────────────────────────────────────
   TIER 9800-9899 — Maha creator (were 99999)
   ────────────────────────────────────────────────────────────── */

/* maha-creator.css: .mc-overlay z:99999 */
.mc-overlay { z-index: 9800 !important; }

/* ──────────────────────────────────────────────────────────────
   TIER 9900-9999 — Absolute ceiling (were 2100000)
   ────────────────────────────────────────────────────────────── */

/* maha-creator.css: .mc-payment-overlay z:2100000 */
.mc-payment-overlay { z-index: 9900 !important; }
