:root {
    --primary-gold: #d4af37;
    --gold-light: #f1d279;
    --gold-dark: #aa8d2e;
    --bg-black: #050505;
    --bg-dark: #0f0f0f;
    --glass-bg: rgba(10, 10, 10, 0.15);
    --glass-border: rgba(212, 175, 55, 0.1);
    --text-main: #f0f0f0;
    --transition: all 0.3s ease;
    --header-height: 0px;
    --drawer-width: 320px;
    --drawer-mini: 80px;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', 'Inter', sans-serif;
}

body {
    background-color: var(--bg-black);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Glassmorphism Utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

/* Typography */
h1,
h2,
h3 {
    color: var(--primary-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Layout */
.app-container {
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-black);
}

/* Main Navigation Controls (Floating) */
.menu-toggle {
    position: absolute;
    top: 25px;
    right: 25px;
    z-index: 1001;
    font-size: 1.8rem;
    color: var(--primary-gold);
    cursor: pointer;
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

[dir="ltr"] .menu-toggle {
    right: auto;
    left: 25px;
}

.menu-toggle:hover {
    background: rgba(212, 175, 55, 0.1);
    box-shadow: var(--glow-shadow);
    transform: scale(1.05);
}

.sidebar {
    position: fixed;
    top: 20px;
    left: 20px;
    right: auto;
    width: var(--drawer-width);
    height: calc(100vh - 40px);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 1.5rem;
    transition: var(--transition);
    border-radius: 20px;
    background: rgba(10, 10, 10, 0.45);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(212, 175, 55, 0.15);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.05);
}

.sidebar.active {
    left: 20px;
    /* Kept fixed on screen */
}

.sidebar.collapsed {
    width: var(--drawer-mini) !important;
    padding: 2rem 0.5rem;
}

@media (max-width: 768px) {
    .sidebar.collapsed {
        width: 0 !important;
        padding: 0;
        visibility: hidden;
    }
}

.sidebar.collapsed .logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.sidebar.collapsed .logo-container h1,
.sidebar.collapsed .nav-item .label,
.sidebar.collapsed .footer-info {
    display: none;
}

.sidebar.collapsed .logo-container .globe-mini {
    width: 45px !important;
    height: 45px !important;
    margin: 0 auto !important;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0.8rem 0;
}

.sidebar.collapsed .nav-item .icon {
    margin: 0;
    font-size: 1.4rem;
}

.collapse-toggle {
    position: absolute;
    top: 50%;
    left: -15px;
    width: 30px;
    height: 30px;
    background: var(--primary-gold);
    color: var(--bg-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3001;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

[dir="ltr"] .collapse-toggle {
    left: auto;
    right: -15px;
}

.sidebar.collapsed .collapse-toggle {
    left: -15px;
}

[dir="ltr"] .sidebar.collapsed .collapse-toggle {
    right: -15px;
}

[dir="ltr"] .sidebar {
    right: auto;
    left: calc(-1 * var(--drawer-width));
    border-left: none;
    border-right: 1px solid var(--glass-border);
}

@media (min-width: 769px) {
    .menu-toggle {
        display: none !important;
    }

    .sidebar.active {
        box-shadow: none;
        /* No shadow on desktop if fixed */
    }

    .sidebar.collapsed {
        box-shadow: none;
    }
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2500;
    display: none;
    animation: fadeIn 0.3s ease;
}

.drawer-overlay.active {
    display: block;
}

.main-content {
    position: absolute;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    z-index: 1;
    overflow: hidden;
}

/* Map Containers */
#map {
    height: 100%;
    width: 100%;
    z-index: 1;
}

/* Dashboard & Analytics */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Overlays & Interactivity */
.overlay,
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 5000;
    display: none;
    /* TRAP FIX: Ensure these are hidden unless explicitly opened */
}

.stat-item {
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 215, 0, 0.05);
    border-color: var(--primary-gold);
}

/* Leaflet Popup Premium Theme */
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: white !important;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.leaflet-popup-content {
    margin: 15px !important;
    line-height: 1.6;
}

.leaflet-container a.leaflet-popup-close-button {
    color: var(--primary-gold) !important;
    padding: 8px 8px 0 0 !important;
}

.premium-popup .leaflet-popup-content-wrapper {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
}

.glass-popup {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* User Management Table */
.table-container {
    border-radius: 12px;
    margin-top: 1rem;
}

table th {
    color: var(--primary-gold);
    font-weight: 500;
}

table td {
    color: rgba(255, 255, 255, 0.8);
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: bold;
}

.badge.super_admin {
    background: rgba(255, 215, 0, 0.2);
    color: var(--primary-gold);
    border: 1px solid var(--primary-gold);
}

.badge.staff {
    background: rgba(0, 242, 254, 0.2);
    color: #00f2fe;
    border: 1px solid #00f2fe;
}

/* Transitions for Views */
#map-view,
#stats-view,
#users-view,
#profile-view {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Abu Jouri Module: Analysis Drawer */
.analysis-drawer {
    position: fixed;
    top: 80px;
    left: -100%;
    /* Hidden by default */
    width: 400px;
    height: calc(100vh - 100px);
    z-index: 3000;
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1.5rem;
    overflow-y: auto;
    border-radius: 0 20px 20px 0;
}

[dir="rtl"] .analysis-drawer {
    left: auto;
    right: -100%;
    border-radius: 20px 0 0 20px;
}

.analysis-drawer.active {
    left: 20px;
}

[dir="rtl"] .analysis-drawer.active {
    left: auto;
    right: 20px;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.close-drawer {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Section 6: Cross-section */
.soil-cross-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 1rem 0;
}

.soil-layer {
    height: 60px;
    background: linear-gradient(90deg, #3d2b1f, #1a1a1a);
    border-radius: 8px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.eye-glow {
    width: 40px;
    height: 20px;
    background: radial-gradient(ellipse at center, #00f2fe, transparent);
    border-radius: 50%;
    box-shadow: 0 0 15px #00f2fe;
}

.depth-tag {
    color: var(--primary-gold);
    font-size: 0.85rem;
    font-weight: bold;
}

/* Section 2: Thermal */
.thermal-container {
    height: 150px;
    background: #000;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.thermal-gradient {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #1a2a6c, #b21f1f, #fdbb2d);
    opacity: 0.6;
}

.water-drops {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
}

/* Section 3: Density */
.density-list {
    list-style: none;
    padding: 0;
}

.density-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.percent {
    color: var(--primary-gold);
    font-weight: bold;
}

/* Section 4: 3D Radar */
.radar-3d-scene {
    perspective: 800px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-cube {
    width: 150px;
    height: 150px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(-30deg) rotateY(45deg);
}

.cube-face {
    position: absolute;
    width: 150px;
    height: 150px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid var(--primary-gold);
}

.cube-face.top {
    transform: rotateX(90deg) translateZ(75px);
}

.cube-face.side-1 {
    transform: translateZ(75px);
}

.cube-face.side-2 {
    transform: rotateY(90deg) translateZ(75px);
}

.water-vein {
    position: absolute;
    width: 4px;
    height: 100px;
    background: #00f2fe;
    top: 25px;
    left: 75px;
    box-shadow: 0 0 20px #00f2fe;
    animation: pulse 2s infinite;
}

.radar-direction {
    position: absolute;
    color: var(--primary-gold);
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    opacity: 0.6;
    letter-spacing: 1px;
    z-index: 5;
}

.radar-direction.north {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.radar-direction.south {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.radar-direction.east {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.radar-direction.west {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

/* Buttons */
.btn-gold {
    background: linear-gradient(135deg, var(--gold-dark), var(--primary-gold));
    color: #000 !important;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

/* Profiles & Forms Regularization */
#profile-view {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#profile-view h2 {
    margin-bottom: 2rem;
}

.input-group {
    width: 100%;
    margin-bottom: 1.5rem;
    text-align: right;
}

[dir="ltr"] .input-group {
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--primary-gold);
    font-weight: 500;
}

.input-group input,
.input-group select,
.glass-input {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.input-group input:focus,
.input-group select:focus,
.glass-input:focus,
.glass-select:focus {
    border-color: var(--primary-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
    background: rgba(212, 175, 55, 0.05);
}

.glass-select {
    padding: 10px 15px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--primary-gold);
    font-size: 0.9rem;
    outline: none;
    backdrop-filter: blur(15px);
    cursor: pointer;
    transition: var(--transition);
}

.glass-select option {
    background: var(--bg-dark);
    color: white;
}

#profile-view button {
    width: 100%;
    margin-top: 1rem;
}

/* Mobile Responsiveness */
/* Map Enhancements */
.search-container {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    width: 500px;
    max-width: 80%;
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-container input {
    flex: 1;
    padding: 15px 25px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 35px;
    color: white;
    font-size: 1rem;
    outline: none;
    backdrop-filter: blur(15px);
    transition: var(--transition);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.layer-toggle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--primary-gold);
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.search-container input:focus {
    border-color: var(--primary-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.search-results {
    position: absolute;
    top: 55px;
    width: 100%;
    max-height: 250px;
}

.nav-menu {
    list-style: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 12px;
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    background: transparent;
    border: 1px solid transparent;
}

/* Sophisticated Hover/Active State */
.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gold);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px var(--primary-gold);
}

.nav-item:hover,
.nav-item.active {
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.05);
}

.nav-item.active::before,
.nav-item:hover::before {
    transform: scaleY(0.7);
}

.nav-item .icon {
    margin-left: 18px;
    /* For Right margin in RTL */
    font-size: 1.4rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    width: 35px;
    height: 35px;
    /* Added height for perfect centering */
}

[dir="ltr"] .nav-item .icon {
    margin-left: 0;
    margin-right: 18px;
}

.nav-item .icon svg {
    width: 100%;
    height: 100%;
}

.nav-item:hover .icon,
.nav-item.active .icon {
    color: var(--primary-gold);
}

.nav-item .label {
    flex: 1;
    transition: var(--transition);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    /* ensures text aligns perfectly with icon */
    line-height: 1;
}

.nav-item:hover .label,
.nav-item.active .label {
    color: var(--primary-gold);
    transform: translateX(5px);
    /* Bump right slightly */
}

.search-item {
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: var(--transition);
    color: rgba(255, 255, 255, 0.8);
}

.search-item:hover {
    background: rgba(212, 175, 55, 0.2);
    color: var(--primary-gold);
}

.locator-btn {
    position: absolute;
    bottom: 30px;
    right: 20px;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 30px;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

[dir="rtl"] .locator-btn {
    right: auto;
    left: 20px;
    bottom: 30px;
}

.locator-icon {
    font-size: 1.2rem;
}

.locator-text {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--primary-gold);
}

.locator-btn:hover {
    transform: scale(1.05);
    border-color: var(--primary-gold);
    background: rgba(212, 175, 55, 0.1);
}

.compass-container {
    position: absolute;
    bottom: 30px;
    left: 20px;
    z-index: 1001;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

[dir="rtl"] .compass-container {
    left: auto;
    right: 20px;
}

.compass-needle {
    font-weight: bold;
    color: var(--primary-gold);
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    position: relative;
}

.compass-needle::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 10px;
    background: var(--primary-gold);
    box-shadow: 0 0 10px var(--primary-gold);
}

@media (max-width: 768px) {
    .menu-toggle {
        top: 20px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }

    [dir="ltr"] .menu-toggle {
        left: 15px;
        right: auto;
    }

    .search-container {
        width: 90%;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        gap: 10px;
    }

    /* In LTR/RTL, ensure search doesn't hit the hamburger */
    [dir="rtl"] .search-container {
        padding-right: 60px;
    }

    [dir="ltr"] .search-container {
        padding-left: 60px;
    }

    .search-container input {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .layer-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .analysis-drawer {
        width: 100%;
        left: -100%;
        border-radius: 0;
        top: 0;
        height: 100vh;
    }

    [dir="rtl"] .analysis-drawer {
        right: -100%;
        left: auto;
    }

    .analysis-drawer.active {
        left: 0;
    }

    [dir="rtl"] .analysis-drawer.active {
        right: 0;
        left: auto;
    }

    .collapse-toggle {
        display: none !important;
    }
}

/* --- MODALS & OVERLAYS RESTORATION --- */
.overlay,
.modal-overlay,
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 4000;
    display: none;
    transition: var(--transition);
}

.overlay.active,
.modal-overlay.active,
.drawer-overlay.active {
    display: block;
}

.modal,
.well-form-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background: var(--bg-dark);
    /* Fallback */
    padding: 2.5rem;
    border-radius: 20px;
    z-index: 5000;
    display: none;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(212, 175, 55, 0.15);
    border: 1px solid var(--glass-border);
}

.modal.glass,
.well-form-panel.glass {
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.well-form-panel h2,
.modal h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-gold);
    font-size: 1.8rem;
}

/* --- LIGHT THEME FOR INNER PAGES --- */

.light-page {
    background-color: #f8fafc !important;
    color: #1e293b !important;
}

.light-page .glass-card,
.light-page .glass-popup {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    color: #1e293b !important;
}

.light-page h2,
.light-page h3,
.light-page h4 {
    color: #0f172a !important;
    font-weight: 700;
}

.light-page .stat-item {
    background: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid #e2e8f0 !important;
}

.light-page .stat-item span {
    color: #64748b !important;
}

.light-page .stat-item div {
    color: var(--primary-gold) !important;
}

.light-page label {
    color: #475569 !important;
}

.light-page input,
.light-page select {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

.light-page input:focus,
.light-page select:focus {
    border-color: var(--primary-gold) !important;
}

.light-page table th {
    color: #64748b !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

.light-page table td {
    border-bottom: 1px solid #f1f5f9 !important;
    color: #1e293b !important;
}

.light-page .density-list li {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
}

/* --- 3D ICONS ROUND FIXES --- */
.menu-icon-3d {
    width: 32px;
    height: 32px;
    object-fit: contain;
    transition: var(--transition);
    filter: drop-shadow(0 2px 4px rgba(212, 175, 55, 0.2));
}

.nav-item:hover .menu-icon-3d,
.nav-item.active .menu-icon-3d {
    transform: scale(1.15) translateY(-2px);
    filter: drop-shadow(0 4px 10px rgba(212, 175, 55, 0.5));
}

/* --- DYNAMIC SIDEBAR OVERLAP PREVENTION --- */
.sidebar:not(.collapsed)~.main-content .light-page {
    padding-left: 360px !important;
    transition: padding-left 0.3s ease;
}

.sidebar.collapsed~.main-content .light-page {
    padding-left: 120px !important;
    transition: padding-left 0.3s ease;
}

@media (max-width: 768px) {

    .sidebar~.main-content .light-page,
    .sidebar.collapsed~.main-content .light-page {
        padding-left: 40px !important;
    }
}